cron job: media_tree daily build: ERRORS

2016-10-14 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:   Sat Oct 15 05:00:23 CEST 2016
media-tree git hash:11a1e0ed7908f04c896e69d0eb65e478c12f8519
media_build git hash:   ecfc9bfca3012b0c6e19967ce90f621f71a6da94
v4l-utils git hash: 79186f9d3d9d3b6bee4a611bd92435d11807
gcc version:i686-linux-gcc (GCC) 6.2.0
sparse version: v0.5.0-3553-g78b2ea6
smatch version: v0.5.0-3553-g78b2ea6
host hardware:  x86_64
host os:4.7.0-164

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-multi: OK
linux-git-arm-pxa: OK
linux-git-blackfin-bf561: OK
linux-git-i686: OK
linux-git-m32r: WARNINGS
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.36.4-i686: WARNINGS
linux-2.6.37.6-i686: WARNINGS
linux-2.6.38.8-i686: ERRORS
linux-2.6.39.4-i686: WARNINGS
linux-3.0.60-i686: WARNINGS
linux-3.1.10-i686: ERRORS
linux-3.2.37-i686: ERRORS
linux-3.3.8-i686: ERRORS
linux-3.4.27-i686: WARNINGS
linux-3.5.7-i686: WARNINGS
linux-3.6.11-i686: WARNINGS
linux-3.7.4-i686: WARNINGS
linux-3.8-i686: WARNINGS
linux-3.9.2-i686: WARNINGS
linux-3.10.1-i686: WARNINGS
linux-3.11.1-i686: OK
linux-3.13.11-i686: WARNINGS
linux-3.14.9-i686: WARNINGS
linux-3.15.2-i686: WARNINGS
linux-3.16.7-i686: WARNINGS
linux-3.17.8-i686: WARNINGS
linux-3.18.7-i686: WARNINGS
linux-3.19-i686: WARNINGS
linux-4.0.9-i686: WARNINGS
linux-4.1.33-i686: WARNINGS
linux-4.2.8-i686: WARNINGS
linux-4.3.6-i686: WARNINGS
linux-4.4.22-i686: WARNINGS
linux-4.5.7-i686: WARNINGS
linux-4.6.7-i686: WARNINGS
linux-4.7.5-i686: WARNINGS
linux-4.8-i686: OK
linux-2.6.36.4-x86_64: WARNINGS
linux-2.6.37.6-x86_64: WARNINGS
linux-2.6.38.8-x86_64: ERRORS
linux-2.6.39.4-x86_64: WARNINGS
linux-3.0.60-x86_64: WARNINGS
linux-3.1.10-x86_64: ERRORS
linux-3.2.37-x86_64: ERRORS
linux-3.3.8-x86_64: ERRORS
linux-3.4.27-x86_64: WARNINGS
linux-3.5.7-x86_64: WARNINGS
linux-3.6.11-x86_64: WARNINGS
linux-3.7.4-x86_64: WARNINGS
linux-3.8-x86_64: WARNINGS
linux-3.9.2-x86_64: WARNINGS
linux-3.10.1-x86_64: WARNINGS
linux-3.11.1-x86_64: OK
linux-3.13.11-x86_64: WARNINGS
linux-3.14.9-x86_64: WARNINGS
linux-3.15.2-x86_64: WARNINGS
linux-3.16.7-x86_64: WARNINGS
linux-3.17.8-x86_64: WARNINGS
linux-3.18.7-x86_64: WARNINGS
linux-3.19-x86_64: WARNINGS
linux-4.0.9-x86_64: WARNINGS
linux-4.1.33-x86_64: WARNINGS
linux-4.2.8-x86_64: WARNINGS
linux-4.3.6-x86_64: WARNINGS
linux-4.4.22-x86_64: WARNINGS
linux-4.5.7-x86_64: WARNINGS
linux-4.6.7-x86_64: WARNINGS
linux-4.7.5-x86_64: WARNINGS
linux-4.8-x86_64: OK
apps: WARNINGS
spec-git: OK
smatch: ERRORS
sparse: WARNINGS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Saturday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Saturday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: V4L2_DEC_CMD_STOP and last_buffer_dequeued

2016-10-14 Thread 李務誠
On Sat, Oct 15, 2016 at 2:20 AM, Nicolas Dufresne
 wrote:
>
> Le mercredi 12 octobre 2016 à 23:33 +0800, Wu-Cheng Li (李務誠) a écrit :
> > I'm trying to use V4L2_DEC_CMD_STOP to implement flush. First the
> > userspace sent V4L2_DEC_CMD_STOP to initiate the flush. The driver
> > set
> > V4L2_BUF_FLAG_LAST on the last CAPTURE buffer. I thought implementing
> > V4L2_DEC_CMD_START in the driver was enough to start the decoder. But
> > last_buffer_dequeued had been set to true in v4l2 core. I couldn't
> > clear last_buffer_dequeued without calling STREAMOFF from the
> > userspace. If I need to call STREAMOFF/STREAMON after
> > V4L2_DEC_CMD_STOP, it looks like V4L2_DEC_CMD_START is not useful.
> > Did
> > I miss anything?
>
> It's likely what the driver do is slightly off what the spec say. All
> user space code so far seems to only drain at EOS. As the next buffer
> is a new stream, it make sense to completely reset the encoder. We'd
> need to review that, but using CMD_START should work if you queue a
> header first.

last_buffer_dequeued is only cleared to false when CAPTURE queue is
STREAMOFF (#1). Queuing a header to OUTPUT queue won't clear
last_buffer_dequeued of CAPTURE queue. It looks to me that v4l2 core
needs to intercept CMD_START and clear last_buffer_dequeued. What do
you think?

http://lxr.free-electrons.com/source/drivers/media/v4l2-core/videobuf2-core.c#L1951
>
>
> Note that for many a flush is the action of getting rid of the pending
> images and achieve by using STREAMOFF. While the effect of CMD_STOP is
> to signal the decoder that no more encoded image will be queued, hence
> remaining images should be delivered to userspace. They will
> differentiate as a flush operation vs as drain operation. This is no
> rocket science of course.

I see. What I want is drain operation. In Chromium terms, CMD_STOP
maps to flush and STREAMOFF maps to reset.
>
>
> regards,
> Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 29/57] [media] ti-vpe: don't break long lines

2016-10-14 Thread Benoit Parrot
Acked-by: Benoit Parrot 

Mauro Carvalho Chehab  wrote on Fri [2016-Oct-14 
17:20:17 -0300]:
> Due to the 80-cols checkpatch warnings, several strings
> were broken into multiple lines. This is not considered
> a good practice anymore, as it makes harder to grep for
> strings at the source code. So, join those continuation
> lines.
> 
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  drivers/media/platform/ti-vpe/vpdma.c | 12 
>  drivers/media/platform/ti-vpe/vpe.c   |  3 +--
>  2 files changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/media/platform/ti-vpe/vpdma.c 
> b/drivers/media/platform/ti-vpe/vpdma.c
> index 3e2e3a33e6ed..079a0c894d02 100644
> --- a/drivers/media/platform/ti-vpe/vpdma.c
> +++ b/drivers/media/platform/ti-vpe/vpdma.c
> @@ -466,8 +466,7 @@ static void dump_cfd(struct vpdma_cfd *cfd)
>  
>   pr_debug("word2: payload_addr = 0x%08x\n", cfd->payload_addr);
>  
> - pr_debug("word3: pkt_type = %d, direct = %d, class = %d, dest = %d, "
> - "payload_len = %d\n", cfd_get_pkt_type(cfd),
> + pr_debug("word3: pkt_type = %d, direct = %d, class = %d, dest = %d, 
> payload_len = %d\n", cfd_get_pkt_type(cfd),
>   cfd_get_direct(cfd), class, cfd_get_dest(cfd),
>   cfd_get_payload_len(cfd));
>  }
> @@ -574,8 +573,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
>   pr_debug("%s data transfer descriptor for channel %d\n",
>   dir == DTD_DIR_OUT ? "outbound" : "inbound", chan);
>  
> - pr_debug("word0: data_type = %d, notify = %d, field = %d, 1D = %d, "
> - "even_ln_skp = %d, odd_ln_skp = %d, line_stride = %d\n",
> + pr_debug("word0: data_type = %d, notify = %d, field = %d, 1D = %d, 
> even_ln_skp = %d, odd_ln_skp = %d, line_stride = %d\n",
>   dtd_get_data_type(dtd), dtd_get_notify(dtd), dtd_get_field(dtd),
>   dtd_get_1d(dtd), dtd_get_even_line_skip(dtd),
>   dtd_get_odd_line_skip(dtd), dtd_get_line_stride(dtd));
> @@ -586,8 +584,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
>  
>   pr_debug("word2: start_addr = %pad\n", &dtd->start_addr);
>  
> - pr_debug("word3: pkt_type = %d, mode = %d, dir = %d, chan = %d, "
> - "pri = %d, next_chan = %d\n", dtd_get_pkt_type(dtd),
> + pr_debug("word3: pkt_type = %d, mode = %d, dir = %d, chan = %d, pri = 
> %d, next_chan = %d\n", dtd_get_pkt_type(dtd),
>   dtd_get_mode(dtd), dir, chan, dtd_get_priority(dtd),
>   dtd_get_next_chan(dtd));
>  
> @@ -595,8 +592,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
>   pr_debug("word4: frame_width = %d, frame_height = %d\n",
>   dtd_get_frame_width(dtd), dtd_get_frame_height(dtd));
>   else
> - pr_debug("word4: desc_write_addr = 0x%08x, write_desc = %d, "
> - "drp_data = %d, use_desc_reg = %d\n",
> + pr_debug("word4: desc_write_addr = 0x%08x, write_desc = %d, 
> drp_data = %d, use_desc_reg = %d\n",
>   dtd_get_desc_write_addr(dtd), dtd_get_write_desc(dtd),
>   dtd_get_drop_data(dtd), dtd_get_use_desc(dtd));
>  
> diff --git a/drivers/media/platform/ti-vpe/vpe.c 
> b/drivers/media/platform/ti-vpe/vpe.c
> index 0189f7f7cb03..1cf4a4c1b899 100644
> --- a/drivers/media/platform/ti-vpe/vpe.c
> +++ b/drivers/media/platform/ti-vpe/vpe.c
> @@ -1263,8 +1263,7 @@ static irqreturn_t vpe_irq(int irq_vpe, void *data)
>   }
>  
>   if (irqst0 | irqst1) {
> - dev_warn(dev->v4l2_dev.dev, "Unexpected interrupt: "
> - "INT0_STATUS0 = 0x%08x, INT0_STATUS1 = 0x%08x\n",
> + dev_warn(dev->v4l2_dev.dev, "Unexpected interrupt: INT0_STATUS0 
> = 0x%08x, INT0_STATUS1 = 0x%08x\n",
>   irqst0, irqst1);
>   }
>  
> -- 
> 2.7.4
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 54/57] [media] platform: don't break long lines

2016-10-14 Thread Robert Jarzmik
Mauro Carvalho Chehab  writes:

> Due to the 80-cols checkpatch warnings, several strings
> were broken into multiple lines. This is not considered
> a good practice anymore, as it makes harder to grep for
> strings at the source code. So, join those continuation
> lines.
>
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  drivers/media/platform/mx2_emmaprp.c | 3 +--
>  drivers/media/platform/pxa_camera.c  | 6 ++
>  drivers/media/platform/via-camera.c  | 7 ++-
>  3 files changed, 5 insertions(+), 11 deletions(-)
For pxa_camera, FWIW:
Acked-by: Robert Jarzmik 

Cheers.

--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 19/57] [media] solo6x10: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/solo6x10/solo6x10-v4l2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2.c 
b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
index b4be47969b6b..12f38e5f2ece 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
@@ -702,8 +702,7 @@ int solo_v4l2_init(struct solo_dev *solo_dev, unsigned nr)
snprintf(solo_dev->vfd->name, sizeof(solo_dev->vfd->name), "%s (%i)",
 SOLO6X10_NAME, solo_dev->vfd->num);
 
-   dev_info(&solo_dev->pdev->dev, "Display as /dev/video%d with "
-"%d inputs (%d extended)\n", solo_dev->vfd->num,
+   dev_info(&solo_dev->pdev->dev, "Display as /dev/video%d with %d inputs 
(%d extended)\n", solo_dev->vfd->num,
 solo_dev->nr_chans, solo_dev->nr_ext);
 
return 0;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 57/57] [media] tuners: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/tuners/fc0011.c  |  7 ++
 drivers/media/tuners/mc44s803.c|  3 +--
 drivers/media/tuners/tda18271-common.c |  3 +--
 drivers/media/tuners/tda18271-fe.c |  3 +--
 drivers/media/tuners/tda18271-maps.c   |  6 +-
 drivers/media/tuners/tda8290.c |  3 +--
 drivers/media/tuners/tea5761.c |  6 ++
 drivers/media/tuners/tuner-simple.c| 39 --
 drivers/media/tuners/xc4000.c  | 25 +++---
 9 files changed, 30 insertions(+), 65 deletions(-)

diff --git a/drivers/media/tuners/fc0011.c b/drivers/media/tuners/fc0011.c
index 3932aa81e18c..2dda8d993c14 100644
--- a/drivers/media/tuners/fc0011.c
+++ b/drivers/media/tuners/fc0011.c
@@ -262,8 +262,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW7M;
break;
default:
-   dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. "
-"Using 6000 kHz.\n",
+   dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. Using 
6000 kHz.\n",
 bandwidth);
bandwidth = 6000;
/* fallthrough */
@@ -435,9 +434,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
if (err)
return err;
 
-   dev_dbg(&priv->i2c->dev, "Tuned to "
-   "fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X "
-   "vcocal=%02X(%u) bw=%u\n",
+   dev_dbg(&priv->i2c->dev, "Tuned to fa=%02X fp=%02X xin=%02X%02X 
vco=%02X vcosel=%02X vcocal=%02X(%u) bw=%u\n",
(unsigned int)regs[FC11_REG_FA],
(unsigned int)regs[FC11_REG_FP],
(unsigned int)regs[FC11_REG_XINHI],
diff --git a/drivers/media/tuners/mc44s803.c b/drivers/media/tuners/mc44s803.c
index f1b764074661..cc0d5ae11eb9 100644
--- a/drivers/media/tuners/mc44s803.c
+++ b/drivers/media/tuners/mc44s803.c
@@ -349,8 +349,7 @@ struct dvb_frontend *mc44s803_attach(struct dvb_frontend 
*fe,
id = MC44S803_REG_MS(reg, MC44S803_ID);
 
if (id != 0x14) {
-   mc_printk(KERN_ERR, "unsupported ID "
-  "(%x should be 0x14)\n", id);
+   mc_printk(KERN_ERR, "unsupported ID (%x should be 0x14)\n", id);
goto error;
}
 
diff --git a/drivers/media/tuners/tda18271-common.c 
b/drivers/media/tuners/tda18271-common.c
index a26bb33102b8..25c0ec42a1c6 100644
--- a/drivers/media/tuners/tda18271-common.c
+++ b/drivers/media/tuners/tda18271-common.c
@@ -251,8 +251,7 @@ static int __tda18271_write_regs(struct dvb_frontend *fe, 
int idx, int len,
}
 
if (ret != 1)
-   tda_err("ERROR: idx = 0x%x, len = %d, "
-   "i2c_transfer returned: %d\n", idx, max, ret);
+   tda_err("ERROR: idx = 0x%x, len = %d, i2c_transfer returned: 
%d\n", idx, max, ret);
 
return (ret == 1 ? 0 : ret);
 }
diff --git a/drivers/media/tuners/tda18271-fe.c 
b/drivers/media/tuners/tda18271-fe.c
index 2d50e8b1dce1..a4730610c0c6 100644
--- a/drivers/media/tuners/tda18271-fe.c
+++ b/drivers/media/tuners/tda18271-fe.c
@@ -26,8 +26,7 @@
 
 int tda18271_debug;
 module_param_named(debug, tda18271_debug, int, 0644);
-MODULE_PARM_DESC(debug, "set debug level "
-"(info=1, map=2, reg=4, adv=8, cal=16 (or-able))");
+MODULE_PARM_DESC(debug, "set debug level (info=1, map=2, reg=4, adv=8, cal=16 
(or-able))");
 
 static int tda18271_cal_on_startup = -1;
 module_param_named(cal, tda18271_cal_on_startup, int, 0644);
diff --git a/drivers/media/tuners/tda18271-maps.c 
b/drivers/media/tuners/tda18271-maps.c
index 1e89dd93c4bb..7d114677b4ca 100644
--- a/drivers/media/tuners/tda18271-maps.c
+++ b/drivers/media/tuners/tda18271-maps.c
@@ -1024,11 +1024,7 @@ int tda18271_lookup_rf_band(struct dvb_frontend *fe, u32 
*freq, u8 *rf_band)
 
while ((map[i].rfmax * 1000) < *freq) {
if (tda18271_debug & DBG_ADV)
-   tda_map("(%d) rfmax = %d < freq = %d, "
-   "rf1_def = %d, rf2_def = %d, rf3_def = %d, "
-   "rf1 = %d, rf2 = %d, rf3 = %d, "
-   "rf_a1 = %d, rf_a2 = %d, "
-   "rf_b1 = %d, rf_b2 = %d\n",
+   tda_map("(%d) rfmax = %d < freq = %d, rf1_def = %d, 
rf2_def = %d, rf3_def = %d, rf1 = %d, rf2 = %d, rf3 = %d, rf_a1 = %d, rf_a2 = 
%d, rf_b1 = %d, rf_b2 = %d\n",
i, map[i].rfmax * 1000, *freq,
map[i].rf1_def, map[i].rf2_def, map[i].rf3_def,
map[i].rf1, map[i].r

[PATCH 56/57] [media] rc: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/rc/ati_remote.c  |  3 +--
 drivers/media/rc/ene_ir.c  |  3 +--
 drivers/media/rc/imon.c| 43 ++
 drivers/media/rc/ite-cir.c |  9 +++--
 drivers/media/rc/mceusb.c  |  4 +---
 drivers/media/rc/rc-main.c |  3 +--
 drivers/media/rc/redrat3.c | 18 ++
 drivers/media/rc/streamzap.c   |  9 +++--
 drivers/media/rc/winbond-cir.c |  9 +++--
 9 files changed, 33 insertions(+), 68 deletions(-)

diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c
index 9f5b59706741..0884b7dc0e71 100644
--- a/drivers/media/rc/ati_remote.c
+++ b/drivers/media/rc/ati_remote.c
@@ -527,8 +527,7 @@ static void ati_remote_input_report(struct urb *urb)
remote_num = (data[3] >> 4) & 0x0f;
if (channel_mask & (1 << (remote_num + 1))) {
dbginfo(&ati_remote->interface->dev,
-   "Masked input from channel 0x%02x: data %02x, "
-   "mask= 0x%02lx\n",
+   "Masked input from channel 0x%02x: data %02x, mask= 
0x%02lx\n",
remote_num, data[2], channel_mask);
return;
}
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index d1c61cd035f6..bd5512e64aea 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -1210,8 +1210,7 @@ MODULE_PARM_DESC(txsim,
 
 MODULE_DEVICE_TABLE(pnp, ene_ids);
 MODULE_DESCRIPTION
-   ("Infrared input driver for KB3926B/C/D/E/F "
-   "(aka ENE0100/ENE0200/ENE0201/ENE0202) CIR port");
+   ("Infrared input driver for KB3926B/C/D/E/F (aka 
ENE0100/ENE0200/ENE0201/ENE0202) CIR port");
 
 MODULE_AUTHOR("Maxim Levitsky");
 MODULE_LICENSE("GPL");
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index d62b1f38292c..bff834f5e018 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -441,13 +441,11 @@ MODULE_PARM_DESC(debug, "Debug messages: 0=no, 1=yes 
(default: no)");
 /* lcd, vfd, vga or none? should be auto-detected, but can be overridden... */
 static int display_type;
 module_param(display_type, int, S_IRUGO);
-MODULE_PARM_DESC(display_type, "Type of attached display. 0=autodetect, "
-"1=vfd, 2=lcd, 3=vga, 4=none (default: autodetect)");
+MODULE_PARM_DESC(display_type, "Type of attached display. 0=autodetect, 1=vfd, 
2=lcd, 3=vga, 4=none (default: autodetect)");
 
 static int pad_stabilize = 1;
 module_param(pad_stabilize, int, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(pad_stabilize, "Apply stabilization algorithm to iMON PAD "
-"presses in arrow key mode. 0=disable, 1=enable (default).");
+MODULE_PARM_DESC(pad_stabilize, "Apply stabilization algorithm to iMON PAD 
presses in arrow key mode. 0=disable, 1=enable (default).");
 
 /*
  * In certain use cases, mouse mode isn't really helpful, and could actually
@@ -455,14 +453,12 @@ MODULE_PARM_DESC(pad_stabilize, "Apply stabilization 
algorithm to iMON PAD "
  */
 static bool nomouse;
 module_param(nomouse, bool, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(nomouse, "Disable mouse input device mode when IR device is "
-"open. 0=don't disable, 1=disable. (default: don't disable)");
+MODULE_PARM_DESC(nomouse, "Disable mouse input device mode when IR device is 
open. 0=don't disable, 1=disable. (default: don't disable)");
 
 /* threshold at which a pad push registers as an arrow key in kbd mode */
 static int pad_thresh;
 module_param(pad_thresh, int, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(pad_thresh, "Threshold at which a pad push registers as an "
-"arrow key in kbd mode (default: 28)");
+MODULE_PARM_DESC(pad_thresh, "Threshold at which a pad push registers as an 
arrow key in kbd mode (default: 28)");
 
 
 static void free_imon_context(struct imon_context *ictx)
@@ -785,9 +781,7 @@ static ssize_t show_associate_remote(struct device *d,
else
strcpy(buf, "closed\n");
 
-   dev_info(d, "Visit http://www.lirc.org/html/imon-24g.html for "
-"instructions on how to associate your iMON 2.4G DT/LT "
-"remote\n");
+   dev_info(d, "Visit http://www.lirc.org/html/imon-24g.html for 
instructions on how to associate your iMON 2.4G DT/LT remote\n");
mutex_unlock(&ictx->lock);
return strlen(buf);
 }
@@ -1115,8 +1109,7 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 
*rc_type)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 };
 
if (*rc_type && !(*rc_type & rc->allowed_protocols))
-   dev_warn(dev, "Looks like you're trying to use an IR protocol "
-"this device does not support\n");
+   

[PATCH 24/57] [media] marvell-ccic: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/marvell-ccic/mcam-core.c | 26 +++--
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c 
b/drivers/media/platform/marvell-ccic/mcam-core.c
index af59bf4dca2d..a8bda6679422 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -49,24 +49,17 @@
 static bool alloc_bufs_at_read;
 module_param(alloc_bufs_at_read, bool, 0444);
 MODULE_PARM_DESC(alloc_bufs_at_read,
-   "Non-zero value causes DMA buffers to be allocated when the "
-   "video capture device is read, rather than at module load "
-   "time.  This saves memory, but decreases the chances of "
-   "successfully getting those buffers.  This parameter is "
-   "only used in the vmalloc buffer mode");
+   "Non-zero value causes DMA buffers to be allocated when the 
video capture device is read, rather than at module load time.  This saves 
memory, but decreases the chances of successfully getting those buffers.  This 
parameter is only used in the vmalloc buffer mode");
 
 static int n_dma_bufs = 3;
 module_param(n_dma_bufs, uint, 0644);
 MODULE_PARM_DESC(n_dma_bufs,
-   "The number of DMA buffers to allocate.  Can be either two "
-   "(saves memory, makes timing tighter) or three.");
+   "The number of DMA buffers to allocate.  Can be either two 
(saves memory, makes timing tighter) or three.");
 
 static int dma_buf_size = VGA_WIDTH * VGA_HEIGHT * 2;  /* Worst case */
 module_param(dma_buf_size, uint, 0444);
 MODULE_PARM_DESC(dma_buf_size,
-   "The size of the allocated DMA buffers.  If actual operating "
-   "parameters require larger buffers, an attempt to reallocate "
-   "will be made.");
+   "The size of the allocated DMA buffers.  If actual operating 
parameters require larger buffers, an attempt to reallocate will be made.");
 #else /* MCAM_MODE_VMALLOC */
 static const bool alloc_bufs_at_read;
 static const int n_dma_bufs = 3;  /* Used by S/G_PARM */
@@ -75,15 +68,12 @@ static const int n_dma_bufs = 3;  /* Used by S/G_PARM */
 static bool flip;
 module_param(flip, bool, 0444);
 MODULE_PARM_DESC(flip,
-   "If set, the sensor will be instructed to flip the image "
-   "vertically.");
+   "If set, the sensor will be instructed to flip the image 
vertically.");
 
 static int buffer_mode = -1;
 module_param(buffer_mode, int, 0444);
 MODULE_PARM_DESC(buffer_mode,
-   "Set the buffer mode to be used; default is to go with what "
-   "the platform driver asks for.  Set to 0 for vmalloc, 1 for "
-   "DMA contiguous.");
+   "Set the buffer mode to be used; default is to go with what the 
platform driver asks for.  Set to 0 for vmalloc, 1 for DMA contiguous.");
 
 /*
  * Status flags.  Always manipulated with bit operations.
@@ -1759,8 +1749,7 @@ int mccic_register(struct mcam_camera *cam)
cam->buffer_mode = buffer_mode;
if (cam->buffer_mode == B_DMA_sg &&
cam->chip_id == MCAM_CAFE) {
-   printk(KERN_ERR "marvell-cam: Cafe can't do S/G I/O, "
-   "attempting vmalloc mode instead\n");
+   printk(KERN_ERR "marvell-cam: Cafe can't do S/G I/O, attempting 
vmalloc mode instead\n");
cam->buffer_mode = B_vmalloc;
}
if (!mcam_buffer_mode_supported(cam->buffer_mode)) {
@@ -1828,8 +1817,7 @@ int mccic_register(struct mcam_camera *cam)
 */
if (cam->buffer_mode == B_vmalloc && !alloc_bufs_at_read) {
if (mcam_alloc_dma_bufs(cam, 1))
-   cam_warn(cam, "Unable to alloc DMA buffers at load"
-   " will try again later.");
+   cam_warn(cam, "Unable to alloc DMA buffers at load will 
try again later.");
}
 
mutex_unlock(&cam->s_mutex);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 28/57] [media] c8sectpfe: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c 
b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 30c148b9d65e..7a2c8fdfbe51 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -112,8 +112,7 @@ static void channel_swdemux_tsklet(unsigned long data)
buf = (u8 *) channel->back_buffer_aligned;
 
dev_dbg(fei->dev,
-   "chan=%d channel=%p num_packets = %d, buf = %p, pos = 0x%x\n\t"
-   "rp=0x%lx, wp=0x%lx\n",
+   "chan=%d channel=%p num_packets = %d, buf = %p, pos = 
0x%x\n\trp=0x%lx, wp=0x%lx\n",
channel->tsin_id, channel, num_packets, buf, pos, rp, wp);
 
for (n = 0; n < num_packets; n++) {
@@ -789,8 +788,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
/* sanity check value */
if (tsin->tsin_id > fei->hw_stats.num_ib) {
dev_err(&pdev->dev,
-   "tsin-num %d specified greater than number\n\t"
-   "of input block hw in SoC! (%d)",
+   "tsin-num %d specified greater than 
number\n\tof input block hw in SoC! (%d)",
tsin->tsin_id, fei->hw_stats.num_ib);
ret = -EINVAL;
goto err_clk_disable;
@@ -855,8 +853,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
tsin->demux_mapping = index;
 
dev_dbg(fei->dev,
-   "channel=%p n=%d tsin_num=%d, invert-ts-clk=%d\n\t"
-   "serial-not-parallel=%d pkt-clk-valid=%d dvb-card=%d\n",
+   "channel=%p n=%d tsin_num=%d, 
invert-ts-clk=%d\n\tserial-not-parallel=%d pkt-clk-valid=%d dvb-card=%d\n",
fei->channel_data[index], index,
tsin->tsin_id, tsin->invert_ts_clk,
tsin->serial_not_parallel, tsin->async_not_sync,
@@ -1045,8 +1042,7 @@ static void load_imem_segment(struct c8sectpfei *fei, 
Elf32_Phdr *phdr,
 */
 
dev_dbg(fei->dev,
-   "Loading IMEM segment %d 0x%08x\n\t"
-   " (0x%x bytes) -> 0x%p (0x%x bytes)\n", seg_num,
+   "Loading IMEM segment %d 0x%08x\n\t (0x%x bytes) -> 0x%p (0x%x 
bytes)\n", seg_num,
phdr->p_paddr, phdr->p_filesz,
dest, phdr->p_memsz + phdr->p_memsz / 3);
 
@@ -1075,8 +1071,7 @@ static void load_dmem_segment(struct c8sectpfei *fei, 
Elf32_Phdr *phdr,
 */
 
dev_dbg(fei->dev,
-   "Loading DMEM segment %d 0x%08x\n\t"
-   "(0x%x bytes) -> 0x%p (0x%x bytes)\n",
+   "Loading DMEM segment %d 0x%08x\n\t(0x%x bytes) -> 0x%p (0x%x 
bytes)\n",
seg_num, phdr->p_paddr, phdr->p_filesz,
dst, phdr->p_memsz);
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 45/57] [media] tm6000: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/tm6000/tm6000-alsa.c  |  4 +---
 drivers/media/usb/tm6000/tm6000-core.c  | 11 +++
 drivers/media/usb/tm6000/tm6000-dvb.c   | 16 +---
 drivers/media/usb/tm6000/tm6000-i2c.c   |  3 +--
 drivers/media/usb/tm6000/tm6000-stds.c  |  3 +--
 drivers/media/usb/tm6000/tm6000-video.c | 15 +--
 6 files changed, 16 insertions(+), 36 deletions(-)

diff --git a/drivers/media/usb/tm6000/tm6000-alsa.c 
b/drivers/media/usb/tm6000/tm6000-alsa.c
index f16fbd1f9f51..422322541af6 100644
--- a/drivers/media/usb/tm6000/tm6000-alsa.c
+++ b/drivers/media/usb/tm6000/tm6000-alsa.c
@@ -58,9 +58,7 @@ MODULE_PARM_DESC(index, "Index value for tm6000x capture 
interface(s).");
 MODULE_DESCRIPTION("ALSA driver module for tm5600/tm6000/tm6010 based TV 
cards");
 MODULE_AUTHOR("Mauro Carvalho Chehab");
 MODULE_LICENSE("GPL");
-MODULE_SUPPORTED_DEVICE("{{Trident,tm5600},"
-   "{{Trident,tm6000},"
-   "{{Trident,tm6010}");
+MODULE_SUPPORTED_DEVICE("{{Trident,tm5600},{{Trident,tm6000},{{Trident,tm6010}");
 static unsigned int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "enable debug messages");
diff --git a/drivers/media/usb/tm6000/tm6000-core.c 
b/drivers/media/usb/tm6000/tm6000-core.c
index 7c32353c59db..0dfef52acd12 100644
--- a/drivers/media/usb/tm6000/tm6000-core.c
+++ b/drivers/media/usb/tm6000/tm6000-core.c
@@ -602,8 +602,7 @@ int tm6000_init(struct tm6000_core *dev)
for (i = 0; i < size; i++) {
rc = tm6000_set_reg(dev, tab[i].req, tab[i].reg, tab[i].val);
if (rc < 0) {
-   printk(KERN_ERR "Error %i while setting req %d, "
-   "reg %d to value %d\n", rc,
+   printk(KERN_ERR "Error %i while setting req %d, reg %d 
to value %d\n", rc,
tab[i].req, tab[i].reg, tab[i].val);
return rc;
}
@@ -761,9 +760,7 @@ int tm6000_tvaudio_set_mute(struct tm6000_core *dev, u8 
mute)
if (dev->dev_type == TM6010)
tm6010_set_mute_sif(dev, mute);
else {
-   printk(KERN_INFO "ERROR: TM5600 and TM6000 don't has"
-   " SIF audio inputs. Please check the %s"
-   " configuration.\n", dev->name);
+   printk(KERN_INFO "ERROR: TM5600 and TM6000 don't has 
SIF audio inputs. Please check the %s configuration.\n", dev->name);
return -EINVAL;
}
break;
@@ -822,9 +819,7 @@ void tm6000_set_volume(struct tm6000_core *dev, int vol)
if (dev->dev_type == TM6010)
tm6010_set_volume_sif(dev, vol);
else
-   printk(KERN_INFO "ERROR: TM5600 and TM6000 don't has"
-   " SIF audio inputs. Please check the %s"
-   " configuration.\n", dev->name);
+   printk(KERN_INFO "ERROR: TM5600 and TM6000 don't has 
SIF audio inputs. Please check the %s configuration.\n", dev->name);
break;
case TM6000_AMUX_ADC1:
case TM6000_AMUX_ADC2:
diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c 
b/drivers/media/usb/tm6000/tm6000-dvb.c
index 0426b210383b..70dbaec1219e 100644
--- a/drivers/media/usb/tm6000/tm6000-dvb.c
+++ b/drivers/media/usb/tm6000/tm6000-dvb.c
@@ -35,9 +35,7 @@ MODULE_DESCRIPTION("DVB driver extension module for 
tm5600/6000/6010 based TV ca
 MODULE_AUTHOR("Mauro Carvalho Chehab");
 MODULE_LICENSE("GPL");
 
-MODULE_SUPPORTED_DEVICE("{{Trident, tm5600},"
-   "{{Trident, tm6000},"
-   "{{Trident, tm6010}");
+MODULE_SUPPORTED_DEVICE("{{Trident, tm5600},{{Trident, tm6000},{{Trident, 
tm6010}");
 
 static int debug;
 
@@ -292,13 +290,11 @@ static int register_dvb(struct tm6000_core *dev)
}
 
if (!dvb_attach(xc2028_attach, dvb->frontend, &cfg)) {
-   printk(KERN_ERR "tm6000: couldn't register "
-   "frontend (xc3028)\n");
+   printk(KERN_ERR "tm6000: couldn't register 
frontend (xc3028)\n");
ret = -EINVAL;
goto frontend_err;
}
-   printk(KERN_INFO "tm6000: XC2028/3028 asked to be "
-"attached to frontend!\n");
+   printk(KERN_INFO "tm6000: XC2028/3028 asked to be 

[PATCH 49/57] [media] uvc: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/uvc/uvc_ctrl.c|  24 ++
 drivers/media/usb/uvc/uvc_debugfs.c |   3 +-
 drivers/media/usb/uvc/uvc_driver.c  | 148 
 drivers/media/usb/uvc/uvc_entity.c  |   6 +-
 drivers/media/usb/uvc/uvc_isight.c  |   9 +--
 drivers/media/usb/uvc/uvc_status.c  |  15 ++--
 drivers/media/usb/uvc/uvc_v4l2.c|   6 +-
 drivers/media/usb/uvc/uvc_video.c   |  69 ++---
 8 files changed, 91 insertions(+), 189 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index c2ee6e39fd0c..6f26451bcb75 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -960,8 +960,7 @@ static int uvc_ctrl_populate_cache(struct uvc_video_chain 
*chain,
 * resolution value to zero.
 */
uvc_warn_once(chain->dev, UVC_WARN_XU_GET_RES,
- "UVC non compliance - GET_RES failed on "
- "an XU control. Enabling workaround.\n");
+ "UVC non compliance - GET_RES failed on 
an XU control. Enabling workaround.\n");
memset(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES), 0,
   ctrl->info.size);
}
@@ -1680,8 +1679,7 @@ static int uvc_ctrl_fill_xu_info(struct uvc_device *dev,
 
uvc_ctrl_fixup_xu_info(dev, ctrl, info);
 
-   uvc_trace(UVC_TRACE_CONTROL, "XU control %pUl/%u queried: len %u, "
- "flags { get %u set %u auto %u }.\n",
+   uvc_trace(UVC_TRACE_CONTROL, "XU control %pUl/%u queried: len %u, flags 
{ get %u set %u auto %u }.\n",
  info->entity, info->selector, info->size,
  (info->flags & UVC_CTRL_FLAG_GET_CUR) ? 1 : 0,
  (info->flags & UVC_CTRL_FLAG_SET_CUR) ? 1 : 0,
@@ -1710,8 +1708,7 @@ static int uvc_ctrl_init_xu_ctrl(struct uvc_device *dev,
 
ret = uvc_ctrl_add_info(dev, ctrl, &info);
if (ret < 0)
-   uvc_trace(UVC_TRACE_CONTROL, "Failed to initialize control "
- "%pUl/%u on device %s entity %u\n", info.entity,
+   uvc_trace(UVC_TRACE_CONTROL, "Failed to initialize control 
%pUl/%u on device %s entity %u\n", info.entity,
  info.selector, dev->udev->devpath, ctrl->entity->id);
 
return ret;
@@ -1904,8 +1901,7 @@ static int uvc_ctrl_add_info(struct uvc_device *dev, 
struct uvc_control *ctrl,
 
ctrl->initialized = 1;
 
-   uvc_trace(UVC_TRACE_CONTROL, "Added control %pUl/%u to device %s "
-   "entity %u\n", ctrl->info.entity, ctrl->info.selector,
+   uvc_trace(UVC_TRACE_CONTROL, "Added control %pUl/%u to device %s entity 
%u\n", ctrl->info.entity, ctrl->info.selector,
dev->udev->devpath, ctrl->entity->id);
 
 done:
@@ -1964,8 +1960,7 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,
int ret;
 
if (mapping->id & ~V4L2_CTRL_ID_MASK) {
-   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', control "
-   "id 0x%08x is invalid.\n", mapping->name,
+   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', control 
id 0x%08x is invalid.\n", mapping->name,
mapping->id);
return -EINVAL;
}
@@ -2004,8 +1999,7 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,
 
list_for_each_entry(map, &ctrl->info.mappings, list) {
if (mapping->id == map->id) {
-   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', "
-   "control id 0x%08x already exists.\n",
+   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', 
control id 0x%08x already exists.\n",
mapping->name, mapping->id);
ret = -EEXIST;
goto done;
@@ -2015,8 +2009,7 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,
/* Prevent excess memory consumption */
if (atomic_inc_return(&dev->nmappings) > UVC_MAX_CONTROL_MAPPINGS) {
atomic_dec(&dev->nmappings);
-   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', maximum "
-   "mappings count (%u) exceeded.\n", mapping->name,
+   uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s', maximum 
mappings count (%u) exceeded.\n", mapping->name,
UVC_MAX_CONTROL_MAPPINGS);
ret = -ENOMEM;
goto done;
@@ -2086,8 +2079,7 @@ static void uvc_ctrl_prune_entity(struct uvc_device *dev,
  

[PATCH 27/57] [media] s5p-mfc: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c| 6 ++
 drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 7 ++-
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 52081ddc9bf2..c0e464dcc7d0 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -793,8 +793,7 @@ static int vidioc_g_crop(struct file *file, void *priv,
cr->c.top = top;
cr->c.width = ctx->img_width - left - right;
cr->c.height = ctx->img_height - top - bottom;
-   mfc_debug(2, "Cropping info [h264]: l=%d t=%d "
-   "w=%d h=%d (r=%d b=%d fw=%d fh=%d\n", left, top,
+   mfc_debug(2, "Cropping info [h264]: l=%d t=%d w=%d h=%d (r=%d 
b=%d fw=%d fh=%d\n", left, top,
cr->c.width, cr->c.height, right, bottom,
ctx->buf_width, ctx->buf_height);
} else {
@@ -802,8 +801,7 @@ static int vidioc_g_crop(struct file *file, void *priv,
cr->c.top = 0;
cr->c.width = ctx->img_width;
cr->c.height = ctx->img_height;
-   mfc_debug(2, "Cropping info: w=%d h=%d fw=%d "
-   "fh=%d\n", cr->c.width, cr->c.height, ctx->buf_width,
+   mfc_debug(2, "Cropping info: w=%d h=%d fw=%d fh=%d\n", 
cr->c.width, cr->c.height, ctx->buf_width,
ctx->buf_height);
}
return 0;
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
index 81e1e4ce6c24..f4301d5bbd32 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
@@ -1293,14 +1293,11 @@ static int s5p_mfc_run_init_dec_buffers(struct 
s5p_mfc_ctx *ctx)
 * First set the output frame buffers
 */
if (ctx->capture_state != QUEUE_BUFS_MMAPED) {
-   mfc_err("It seems that not all destionation buffers were "
-   "mmaped\nMFC requires that all destination are mmaped "
-   "before starting processing\n");
+   mfc_err("It seems that not all destionation buffers were 
mmaped\nMFC requires that all destination are mmaped before starting 
processing\n");
return -EAGAIN;
}
if (list_empty(&ctx->src_queue)) {
-   mfc_err("Header has been deallocated in the middle of"
-   " initialization\n");
+   mfc_err("Header has been deallocated in the middle of 
initialization\n");
return -EIO;
}
temp_vb = list_entry(ctx->src_queue.next, struct s5p_mfc_buf, list);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 50/57] [media] zr364xx: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/zr364xx/zr364xx.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/usb/zr364xx/zr364xx.c 
b/drivers/media/usb/zr364xx/zr364xx.c
index cc128db85723..3950708cbb32 100644
--- a/drivers/media/usb/zr364xx/zr364xx.c
+++ b/drivers/media/usb/zr364xx/zr364xx.c
@@ -633,8 +633,7 @@ static int zr364xx_read_video_callback(struct 
zr364xx_camera *cam,
} else {
if (frm->cur_size + purb->actual_length > MAX_FRAME_SIZE) {
dev_info(&cam->udev->dev,
-"%s: buffer (%d bytes) too small to hold "
-"frame data. Discarding frame data.\n",
+"%s: buffer (%d bytes) too small to hold frame 
data. Discarding frame data.\n",
 __func__, MAX_FRAME_SIZE);
} else {
pdest += frm->cur_size;
@@ -1373,8 +1372,7 @@ static int zr364xx_board_init(struct zr364xx_camera *cam)
&cam->buffer.frame[i], i,
cam->buffer.frame[i].lpvbits);
if (cam->buffer.frame[i].lpvbits == NULL) {
-   printk(KERN_INFO KBUILD_MODNAME ": out of memory. "
-  "Using less frames\n");
+   printk(KERN_INFO KBUILD_MODNAME ": out of memory. Using 
less frames\n");
break;
}
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 14/57] [media] ivtv: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/ivtv/ivtv-alsa-main.c |  9 +++--
 drivers/media/pci/ivtv/ivtv-driver.c| 36 +++--
 drivers/media/pci/ivtv/ivtv-firmware.c  |  3 +--
 drivers/media/pci/ivtv/ivtv-yuv.c   |  6 ++
 drivers/media/pci/ivtv/ivtvfb.c |  3 +--
 5 files changed, 19 insertions(+), 38 deletions(-)

diff --git a/drivers/media/pci/ivtv/ivtv-alsa-main.c 
b/drivers/media/pci/ivtv/ivtv-alsa-main.c
index 8a86b61a896d..5bb28aa9a328 100644
--- a/drivers/media/pci/ivtv/ivtv-alsa-main.c
+++ b/drivers/media/pci/ivtv/ivtv-alsa-main.c
@@ -177,8 +177,7 @@ static int snd_ivtv_init(struct v4l2_device *v4l2_dev)
 #if 0
ret = snd_ivtv_mixer_create(itvsc);
if (ret) {
-   IVTV_ALSA_WARN("%s: snd_ivtv_mixer_create() failed with err %d:"
-  " proceeding anyway\n", __func__, ret);
+   IVTV_ALSA_WARN("%s: snd_ivtv_mixer_create() failed with err %d: 
proceeding anyway\n", __func__, ret);
}
 #endif
 
@@ -235,8 +234,7 @@ static int ivtv_alsa_load(struct ivtv *itv)
 
s = &itv->streams[IVTV_ENC_STREAM_TYPE_PCM];
if (s->vdev.v4l2_dev == NULL) {
-   IVTV_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - "
-"skipping\n", __func__);
+   IVTV_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - 
skipping\n", __func__);
return 0;
}
 
@@ -250,8 +248,7 @@ static int ivtv_alsa_load(struct ivtv *itv)
IVTV_ALSA_ERR("%s: failed to create struct snd_ivtv_card\n",
  __func__);
} else {
-   IVTV_DEBUG_ALSA_INFO("%s: created ivtv ALSA interface instance "
-"\n", __func__);
+   IVTV_DEBUG_ALSA_INFO("%s: created ivtv ALSA interface instance 
\n", __func__);
}
return 0;
 }
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c 
b/drivers/media/pci/ivtv/ivtv-driver.c
index 374033a5bdaf..7f52b2ac6ada 100644
--- a/drivers/media/pci/ivtv/ivtv-driver.c
+++ b/drivers/media/pci/ivtv/ivtv-driver.c
@@ -885,8 +885,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev 
*pdev,
pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &pci_latency);
 
if (pci_latency < 64 && ivtv_pci_latency) {
-   IVTV_INFO("Unreasonably low latency timer, "
-  "setting to 64 (was %d)\n", pci_latency);
+   IVTV_INFO("Unreasonably low latency timer, setting to 64 (was 
%d)\n", pci_latency);
pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 64);
pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &pci_latency);
}
@@ -896,8 +895,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev 
*pdev,
   these problems. */
pci_write_config_dword(pdev, 0x40, 0x);
 
-   IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, "
-  "irq: %d, latency: %d, memory: 0x%llx\n",
+   IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, irq: %d, latency: %d, 
memory: 0x%llx\n",
   pdev->device, pdev->revision, pdev->bus->number,
   PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn),
   pdev->irq, pci_latency, (u64)itv->base_addr);
@@ -1047,13 +1045,10 @@ static int ivtv_probe(struct pci_dev *pdev, const 
struct pci_device_id *pci_id)
itv->enc_mem = ioremap_nocache(itv->base_addr + IVTV_ENCODER_OFFSET,
   IVTV_ENCODER_SIZE);
if (!itv->enc_mem) {
-   IVTV_ERR("ioremap failed. Can't get a window into CX23415/6 "
-"encoder memory\n");
-   IVTV_ERR("Each capture card with a CX23415/6 needs 8 MB of "
-"vmalloc address space for this window\n");
+   IVTV_ERR("ioremap failed. Can't get a window into CX23415/6 
encoder memory\n");
+   IVTV_ERR("Each capture card with a CX23415/6 needs 8 MB of 
vmalloc address space for this window\n");
IVTV_ERR("Check the output of 'grep Vmalloc /proc/meminfo'\n");
-   IVTV_ERR("Use the vmalloc= kernel command line option to set "
-"VmallocTotal to a larger value\n");
+   IVTV_ERR("Use the vmalloc= kernel command line option to set 
VmallocTotal to a larger value\n");
retval = -ENOMEM;
goto free_mem;
}
@@ -1064,14 +1059,10 @@ static int ivtv_probe(struct pci_dev *pdev, const 
struct pci_device_id *pci_id)
itv->dec_mem = ioremap_nocache(itv->base_addr + 
IVTV_DECODER_OFFSET,
IVTV_DECODER_SIZE);
 

[PATCH 17/57] [media] saa7134: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/saa7134/saa7134-alsa.c  |  3 +--
 drivers/media/pci/saa7134/saa7134-cards.c |  6 ++
 drivers/media/pci/saa7134/saa7134-core.c  | 29 +
 drivers/media/pci/saa7134/saa7134-dvb.c   | 24 
 drivers/media/pci/saa7134/saa7134-input.c | 12 
 5 files changed, 24 insertions(+), 50 deletions(-)

diff --git a/drivers/media/pci/saa7134/saa7134-alsa.c 
b/drivers/media/pci/saa7134/saa7134-alsa.c
index dc0e2fc5f68b..8a35ecfb75e3 100644
--- a/drivers/media/pci/saa7134/saa7134-alsa.c
+++ b/drivers/media/pci/saa7134/saa7134-alsa.c
@@ -813,8 +813,7 @@ static int snd_card_saa7134_capture_open(struct 
snd_pcm_substream * substream)
int amux, err;
 
if (!saa7134) {
-   pr_err("BUG: saa7134 can't find device struct."
-   " Can't proceed with open\n");
+   pr_err("BUG: saa7134 can't find device struct. Can't proceed 
with open\n");
return -ENODEV;
}
dev = saa7134->dev;
diff --git a/drivers/media/pci/saa7134/saa7134-cards.c 
b/drivers/media/pci/saa7134/saa7134-cards.c
index c480a7e87593..803abe8e53f6 100644
--- a/drivers/media/pci/saa7134/saa7134-cards.c
+++ b/drivers/media/pci/saa7134/saa7134-cards.c
@@ -7341,8 +7341,7 @@ static void hauppauge_eeprom(struct saa7134_dev *dev, u8 
*eeprom_data)
case 67659: /* WinTV-HVR1110 (OEM, no IR, hybrid, FM, SVid/Comp, RCA 
aud) */
break;
default:
-   pr_warn("%s: warning: "
-  "unknown hauppauge model #%d\n", dev->name, tv.model);
+   pr_warn("%s: warning: unknown hauppauge model #%d\n", 
dev->name, tv.model);
break;
}
 
@@ -7920,8 +7919,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
msg.addr = 0x0b;
msg.len = 1;
if (1 != i2c_transfer(&dev->i2c_adap, &msg, 1)) {
-   pr_warn("%s: send wake up byte to pic16C505"
-   "(IR chip) failed\n", dev->name);
+   pr_warn("%s: send wake up byte to pic16C505(IR chip) 
failed\n", dev->name);
} else {
msg.flags = I2C_M_RD;
rc = i2c_transfer(&dev->i2c_adap, &msg, 1);
diff --git a/drivers/media/pci/saa7134/saa7134-core.c 
b/drivers/media/pci/saa7134/saa7134-core.c
index ffb66a9ae23e..757bc9acb148 100644
--- a/drivers/media/pci/saa7134/saa7134-core.c
+++ b/drivers/media/pci/saa7134/saa7134-core.c
@@ -66,8 +66,7 @@ MODULE_PARM_DESC(latency,"pci latency timer");
 
 int saa7134_no_overlay=-1;
 module_param_named(no_overlay, saa7134_no_overlay, int, 0444);
-MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 
enables)"
-   " [some VIA/SIS chipsets are known to have problem with 
overlay]");
+MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 
enables) [some VIA/SIS chipsets are known to have problem with overlay]");
 
 bool saa7134_userptr;
 module_param(saa7134_userptr, bool, 0644);
@@ -619,25 +618,21 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id)
print_irqstatus(dev,loop,report,status);
if (report & SAA7134_IRQ_REPORT_PE) {
/* disable all parity error */
-   pr_warn("%s/irq: looping -- "
-  "clearing PE (parity error!) enable 
bit\n",dev->name);
+   pr_warn("%s/irq: looping -- clearing PE (parity error!) 
enable bit\n",dev->name);
saa_clearl(SAA7134_IRQ2,SAA7134_IRQ2_INTE_PE);
} else if (report & SAA7134_IRQ_REPORT_GPIO16) {
/* disable gpio16 IRQ */
-   pr_warn("%s/irq: looping -- "
-  "clearing GPIO16 enable bit\n",dev->name);
+   pr_warn("%s/irq: looping -- clearing GPIO16 enable 
bit\n",dev->name);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16_P);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16_N);
} else if (report & SAA7134_IRQ_REPORT_GPIO18) {
/* disable gpio18 IRQs */
-   pr_warn("%s/irq: looping -- "
-  "clearing GPIO18 enable bit\n",dev->name);
+   pr_warn("%s/irq: looping -- clearing GPIO18 enable 
bit\n",dev->name);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18_P);
saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18_N);
} else {
/* disable all ir

[PATCH 18/57] [media] saa7164: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/saa7164/saa7164-buffer.c  |  3 +-
 drivers/media/pci/saa7164/saa7164-bus.c |  3 +-
 drivers/media/pci/saa7164/saa7164-cards.c   |  3 +-
 drivers/media/pci/saa7164/saa7164-cmd.c | 10 ++
 drivers/media/pci/saa7164/saa7164-core.c| 56 ++---
 drivers/media/pci/saa7164/saa7164-dvb.c | 27 +-
 drivers/media/pci/saa7164/saa7164-encoder.c | 15 +++-
 drivers/media/pci/saa7164/saa7164-fw.c  |  9 ++---
 drivers/media/pci/saa7164/saa7164-vbi.c | 12 +++
 9 files changed, 45 insertions(+), 93 deletions(-)

diff --git a/drivers/media/pci/saa7164/saa7164-buffer.c 
b/drivers/media/pci/saa7164/saa7164-buffer.c
index f30758e24f5d..ff04ef322fc1 100644
--- a/drivers/media/pci/saa7164/saa7164-buffer.c
+++ b/drivers/media/pci/saa7164/saa7164-buffer.c
@@ -218,8 +218,7 @@ int saa7164_buffer_activate(struct saa7164_buffer *buf, int 
i)
saa7164_writel(port->bufptr32h + ((sizeof(u32) * 2) * i), buf->pt_dma);
saa7164_writel(port->bufptr32l + ((sizeof(u32) * 2) * i), 0);
 
-   dprintk(DBGLVL_BUF, "   buf[%d] offset 0x%llx (0x%x) "
-   "buf 0x%llx/%llx (0x%x/%x) nr=%d\n",
+   dprintk(DBGLVL_BUF, "   buf[%d] offset 0x%llx (0x%x) buf 0x%llx/%llx 
(0x%x/%x) nr=%d\n",
buf->idx,
(u64)port->bufoffset + (i * sizeof(u32)),
saa7164_readl(port->bufoffset + (sizeof(u32) * i)),
diff --git a/drivers/media/pci/saa7164/saa7164-bus.c 
b/drivers/media/pci/saa7164/saa7164-bus.c
index a18fe5d47238..00c2aae059a0 100644
--- a/drivers/media/pci/saa7164/saa7164-bus.c
+++ b/drivers/media/pci/saa7164/saa7164-bus.c
@@ -427,8 +427,7 @@ int saa7164_bus_get(struct saa7164_dev *dev, struct 
tmComResInfo* msg,
write_distance = curr_gwp + bus->m_dwSizeGetRing - curr_grp;
 
if (bytes_to_read > write_distance) {
-   printk(KERN_ERR "%s() Invalid bus state, missing msg "
-   "or mangled ring, faulty H/W / bad code?\n", __func__);
+   printk(KERN_ERR "%s() Invalid bus state, missing msg or mangled 
ring, faulty H/W / bad code?\n", __func__);
ret = SAA_ERR_INVALID_COMMAND;
goto out;
}
diff --git a/drivers/media/pci/saa7164/saa7164-cards.c 
b/drivers/media/pci/saa7164/saa7164-cards.c
index c2b738227f58..bfe0af2c00f4 100644
--- a/drivers/media/pci/saa7164/saa7164-cards.c
+++ b/drivers/media/pci/saa7164/saa7164-cards.c
@@ -726,8 +726,7 @@ void saa7164_card_list(struct saa7164_dev *dev)
dev->name, dev->name, dev->name, dev->name);
}
 
-   printk(KERN_ERR "%s: Here are valid choices for the card= insmod "
-   "option:\n", dev->name);
+   printk(KERN_ERR "%s: Here are valid choices for the card= insmod 
option:\n", dev->name);
 
for (i = 0; i < saa7164_bcount; i++)
printk(KERN_ERR "%s:card=%d -> %s\n",
diff --git a/drivers/media/pci/saa7164/saa7164-cmd.c 
b/drivers/media/pci/saa7164/saa7164-cmd.c
index 3285c37b4583..1a6fc8e589b6 100644
--- a/drivers/media/pci/saa7164/saa7164-cmd.c
+++ b/drivers/media/pci/saa7164/saa7164-cmd.c
@@ -301,8 +301,7 @@ static int saa7164_cmd_wait(struct saa7164_dev *dev, u8 
seqno)
else
saa7164_cmd_timeout_seqno(dev, seqno);
 
-   dprintk(DBGLVL_CMD, "%s(seqno=%d) Waiting res = %d "
-   "(signalled=%d)\n", __func__, seqno, r,
+   dprintk(DBGLVL_CMD, "%s(seqno=%d) Waiting res = %d 
(signalled=%d)\n", __func__, seqno, r,
dev->cmds[seqno].signalled);
} else
ret = SAA_OK;
@@ -353,8 +352,7 @@ int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, enum 
tmComResCmd command,
int ret;
int safety = 0;
 
-   dprintk(DBGLVL_CMD, "%s(unitid = %s (%d) , command = 0x%x, "
-   "sel = 0x%x)\n", __func__, saa7164_unitid_name(dev, id), id,
+   dprintk(DBGLVL_CMD, "%s(unitid = %s (%d) , command = 0x%x, sel = 
0x%x)\n", __func__, saa7164_unitid_name(dev, id), id,
command, controlselector);
 
if ((size == 0) || (buf == NULL)) {
@@ -452,9 +450,7 @@ int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, enum 
tmComResCmd command,
if (presponse_t->seqno != pcommand_t->seqno) {
 
dprintk(DBGLVL_CMD,
-   "wrong event: seqno = %d, "
-   "expected seqno = %d, "
-   "will dequeue regardless\n",
+   "wrong event: seqno = %d, expected seqno = %d, 
will dequeue reg

[PATCH 20/57] [media] ttpci: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/ttpci/av7110.c   | 27 +--
 drivers/media/pci/ttpci/av7110_hw.c| 12 
 drivers/media/pci/ttpci/budget-av.c|  3 +--
 drivers/media/pci/ttpci/budget-ci.c|  4 +---
 drivers/media/pci/ttpci/budget-patch.c |  3 +--
 drivers/media/pci/ttpci/budget.c   |  3 +--
 drivers/media/pci/ttpci/ttpci-eeprom.c |  3 +--
 7 files changed, 18 insertions(+), 37 deletions(-)

diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c
index 382caf200ba1..155a46001631 100644
--- a/drivers/media/pci/ttpci/av7110.c
+++ b/drivers/media/pci/ttpci/av7110.c
@@ -100,8 +100,7 @@ MODULE_PARM_DESC(adac,"audio DAC type: 0 TI, 1 CRYSTAL, 2 
MSP (use if autodetect
 module_param(hw_sections, int, 0444);
 MODULE_PARM_DESC(hw_sections, "0 use software section filter, 1 use hardware");
 module_param(rgb_on, int, 0444);
-MODULE_PARM_DESC(rgb_on, "For Siemens DVB-C cards only: Enable RGB control"
-   " signal on SCART pin 16 to switch SCART video mode from CVBS 
to RGB");
+MODULE_PARM_DESC(rgb_on, "For Siemens DVB-C cards only: Enable RGB control 
signal on SCART pin 16 to switch SCART video mode from CVBS to RGB");
 module_param(volume, int, 0444);
 MODULE_PARM_DESC(volume, "initial volume: default 255 (range 0-255)");
 module_param(budgetpatch, int, 0444);
@@ -833,8 +832,7 @@ static int StartHWFilter(struct dvb_demux_filter 
*dvbdmxfilter)
 
ret = av7110_fw_request(av7110, buf, 20, &handle, 1);
if (ret != 0 || handle >= 32) {
-   printk("dvb-ttpci: %s error  buf %04x %04x %04x %04x  "
-   "ret %d  handle %04x\n",
+   printk("dvb-ttpci: %s error  buf %04x %04x %04x %04x  ret %d  
handle %04x\n",
__func__, buf[0], buf[1], buf[2], buf[3],
ret, handle);
dvbdmxfilter->hw_handle = 0x;
@@ -876,8 +874,7 @@ static int StopHWFilter(struct dvb_demux_filter 
*dvbdmxfilter)
buf[2] = handle;
ret = av7110_fw_request(av7110, buf, 3, answ, 2);
if (ret != 0 || answ[1] != handle) {
-   printk("dvb-ttpci: %s error  cmd %04x %04x %04x  ret %x  "
-   "resp %04x %04x  pid %d\n",
+   printk("dvb-ttpci: %s error  cmd %04x %04x %04x  ret %x  resp 
%04x %04x  pid %d\n",
__func__, buf[0], buf[1], buf[2], ret,
answ[0], answ[1], dvbdmxfilter->feed->pid);
if (!ret)
@@ -1532,15 +1529,11 @@ static int get_firmware(struct av7110* av7110)
ret = request_firmware(&fw, "dvb-ttpci-01.fw", &av7110->dev->pci->dev);
if (ret) {
if (ret == -ENOENT) {
-   printk(KERN_ERR "dvb-ttpci: could not load firmware,"
-  " file not found: dvb-ttpci-01.fw\n");
-   printk(KERN_ERR "dvb-ttpci: usually this should be in "
-  "/usr/lib/hotplug/firmware or /lib/firmware\n");
-   printk(KERN_ERR "dvb-ttpci: and can be downloaded from"
-  " https://linuxtv.org/download/dvb/firmware/\n";);
+   printk(KERN_ERR "dvb-ttpci: could not load firmware, 
file not found: dvb-ttpci-01.fw\n");
+   printk(KERN_ERR "dvb-ttpci: usually this should be in 
/usr/lib/hotplug/firmware or /lib/firmware\n");
+   printk(KERN_ERR "dvb-ttpci: and can be downloaded from 
https://linuxtv.org/download/dvb/firmware/\n";);
} else
-   printk(KERN_ERR "dvb-ttpci: cannot request firmware"
-  " (error %i)\n", ret);
+   printk(KERN_ERR "dvb-ttpci: cannot request firmware 
(error %i)\n", ret);
return -EINVAL;
}
 
@@ -2700,8 +2693,7 @@ static int av7110_attach(struct saa7146_dev* dev,
goto err_stop_arm_9;
 
if (FW_VERSION(av7110->arm_app)<0x2501)
-   printk ("dvb-ttpci: Warning, firmware version 0x%04x is too 
old. "
-   "System might be unstable!\n", 
FW_VERSION(av7110->arm_app));
+   printk ("dvb-ttpci: Warning, firmware version 0x%04x is too 
old. System might be unstable!\n", FW_VERSION(av7110->arm_app));
 
thread = kthread_run(arm_thread, (void *) av7110, "arm_mon");
if (IS_ERR(thread)) {
@@ -2944,7 +2936,6 @@ static void __exit av7110_exit(void)
 module_init(av7110_init);
 module_exit(av7110_exit);
 
-MODULE_DESCRIPTION("driver for the SAA7146 based AV110 PCI DVB cards by "
-  "Siemens, Technotrend, Hauppauge");
+MODULE_DESCRIP

[PATCH 22/57] [media] davinci: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/davinci/dm355_ccdc.c   |  3 +--
 drivers/media/platform/davinci/dm644x_ccdc.c  |  3 +--
 drivers/media/platform/davinci/vpbe.c | 15 +--
 drivers/media/platform/davinci/vpfe_capture.c |  6 ++
 drivers/media/platform/davinci/vpif_capture.c |  9 ++---
 drivers/media/platform/davinci/vpif_display.c |  9 ++---
 drivers/media/platform/davinci/vpss.c |  6 ++
 7 files changed, 15 insertions(+), 36 deletions(-)

diff --git a/drivers/media/platform/davinci/dm355_ccdc.c 
b/drivers/media/platform/davinci/dm355_ccdc.c
index c90b9a4f0c24..11fa008331dd 100644
--- a/drivers/media/platform/davinci/dm355_ccdc.c
+++ b/drivers/media/platform/davinci/dm355_ccdc.c
@@ -334,8 +334,7 @@ static int ccdc_set_params(void __user *params)
 
x = copy_from_user(&ccdc_raw_params, params, sizeof(ccdc_raw_params));
if (x) {
-   dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying ccdc"
-   "params, %d\n", x);
+   dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying 
ccdcparams, %d\n", x);
return -EFAULT;
}
 
diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c 
b/drivers/media/platform/davinci/dm644x_ccdc.c
index 6fba32bec974..a83014da57d5 100644
--- a/drivers/media/platform/davinci/dm644x_ccdc.c
+++ b/drivers/media/platform/davinci/dm644x_ccdc.c
@@ -354,8 +354,7 @@ static int ccdc_set_params(void __user *params)
 
x = copy_from_user(&ccdc_raw_params, params, sizeof(ccdc_raw_params));
if (x) {
-   dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying"
-  "ccdc params, %d\n", x);
+   dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copyingccdc 
params, %d\n", x);
return -EFAULT;
}
 
diff --git a/drivers/media/platform/davinci/vpbe.c 
b/drivers/media/platform/davinci/vpbe.c
index 9a6c2cc38acb..7d2670732805 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -705,15 +705,13 @@ static int vpbe_initialize(struct device *dev, struct 
vpbe_device *vpbe_dev)
  "v4l2 sub device %s registered\n",
  enc_info->module_name);
else {
-   v4l2_err(&vpbe_dev->v4l2_dev, "encoder %s"
-" failed to register",
+   v4l2_err(&vpbe_dev->v4l2_dev, "encoder %s 
failed to register",
 enc_info->module_name);
ret = -ENODEV;
goto fail_kfree_encoders;
}
} else
-   v4l2_warn(&vpbe_dev->v4l2_dev, "non-i2c encoders"
-" currently not supported");
+   v4l2_warn(&vpbe_dev->v4l2_dev, "non-i2c encoders 
currently not supported");
}
/* Add amplifier subdevice for dm365 */
if ((strcmp(vpbe_dev->cfg->module_name, "dm365-vpbe-display") == 0) &&
@@ -735,8 +733,7 @@ static int vpbe_initialize(struct device *dev, struct 
vpbe_device *vpbe_dev)
  amp_info->module_name);
} else {
vpbe_dev->amp = NULL;
-   v4l2_warn(&vpbe_dev->v4l2_dev, "non-i2c amplifiers"
-   " currently not supported");
+   v4l2_warn(&vpbe_dev->v4l2_dev, "non-i2c amplifiers 
currently not supported");
}
} else {
vpbe_dev->amp = NULL;
@@ -835,15 +832,13 @@ static int vpbe_probe(struct platform_device *pdev)
if (!cfg->module_name[0] ||
!cfg->osd.module_name[0] ||
!cfg->venc.module_name[0]) {
-   v4l2_err(pdev->dev.driver, "vpbe display module names not"
-" defined\n");
+   v4l2_err(pdev->dev.driver, "vpbe display module names not 
defined\n");
return ret;
}
 
vpbe_dev = kzalloc(sizeof(*vpbe_dev), GFP_KERNEL);
if (vpbe_dev == NULL) {
-   v4l2_err(pdev->dev.driver, "Unable to allocate memory"
-" for vpbe_device\n");
+   v4l2_err(pdev->dev.driver, "Unable to allocate memory for 
vpbe_device\n");
return -ENOMEM;
}
vpbe_dev->cfg = cfg;
diff --git a/drivers/media/platform/davinci/vpfe_capture.c 
b/drivers/media/platform/davinci/vpfe_capture.c
index 6efb2f1631c4..ca22c3493f55 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/

[PATCH 23/57] [media] exynos4-is: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/exynos4-is/media-dev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/media-dev.c 
b/drivers/media/platform/exynos4-is/media-dev.c
index 1a1154a9dfa4..e3a8709138fa 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -938,8 +938,7 @@ static int fimc_md_create_links(struct fimc_md *fmd)
 
csis = fmd->csis[pdata->mux_id].sd;
if (WARN(csis == NULL,
-"MIPI-CSI interface specified "
-"but s5p-csis module is not loaded!\n"))
+"MIPI-CSI interface specified but s5p-csis 
module is not loaded!\n"))
return -EINVAL;
 
pad = sensor->entity.num_pads - 1;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 13/57] [media] dm1105: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/dm1105/dm1105.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/pci/dm1105/dm1105.c 
b/drivers/media/pci/dm1105/dm1105.c
index 5dd504741b12..a589aa78d1d9 100644
--- a/drivers/media/pci/dm1105/dm1105.c
+++ b/drivers/media/pci/dm1105/dm1105.c
@@ -315,8 +315,7 @@ static void dm1105_card_list(struct pci_dev *pci)
"dm1105: Updating to the latest version might help\n"
"dm1105: as well.\n");
}
-   printk(KERN_ERR "Here is a list of valid choices for the card= "
-  "insmod option:\n");
+   printk(KERN_ERR "Here is a list of valid choices for the card= 
insmod option:\n");
for (i = 0; i < ARRAY_SIZE(dm1105_boards); i++)
printk(KERN_ERR "dm1105:card=%d -> %s\n",
i, dm1105_boards[i].name);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 29/57] [media] ti-vpe: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/ti-vpe/vpdma.c | 12 
 drivers/media/platform/ti-vpe/vpe.c   |  3 +--
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/ti-vpe/vpdma.c 
b/drivers/media/platform/ti-vpe/vpdma.c
index 3e2e3a33e6ed..079a0c894d02 100644
--- a/drivers/media/platform/ti-vpe/vpdma.c
+++ b/drivers/media/platform/ti-vpe/vpdma.c
@@ -466,8 +466,7 @@ static void dump_cfd(struct vpdma_cfd *cfd)
 
pr_debug("word2: payload_addr = 0x%08x\n", cfd->payload_addr);
 
-   pr_debug("word3: pkt_type = %d, direct = %d, class = %d, dest = %d, "
-   "payload_len = %d\n", cfd_get_pkt_type(cfd),
+   pr_debug("word3: pkt_type = %d, direct = %d, class = %d, dest = %d, 
payload_len = %d\n", cfd_get_pkt_type(cfd),
cfd_get_direct(cfd), class, cfd_get_dest(cfd),
cfd_get_payload_len(cfd));
 }
@@ -574,8 +573,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
pr_debug("%s data transfer descriptor for channel %d\n",
dir == DTD_DIR_OUT ? "outbound" : "inbound", chan);
 
-   pr_debug("word0: data_type = %d, notify = %d, field = %d, 1D = %d, "
-   "even_ln_skp = %d, odd_ln_skp = %d, line_stride = %d\n",
+   pr_debug("word0: data_type = %d, notify = %d, field = %d, 1D = %d, 
even_ln_skp = %d, odd_ln_skp = %d, line_stride = %d\n",
dtd_get_data_type(dtd), dtd_get_notify(dtd), dtd_get_field(dtd),
dtd_get_1d(dtd), dtd_get_even_line_skip(dtd),
dtd_get_odd_line_skip(dtd), dtd_get_line_stride(dtd));
@@ -586,8 +584,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
 
pr_debug("word2: start_addr = %pad\n", &dtd->start_addr);
 
-   pr_debug("word3: pkt_type = %d, mode = %d, dir = %d, chan = %d, "
-   "pri = %d, next_chan = %d\n", dtd_get_pkt_type(dtd),
+   pr_debug("word3: pkt_type = %d, mode = %d, dir = %d, chan = %d, pri = 
%d, next_chan = %d\n", dtd_get_pkt_type(dtd),
dtd_get_mode(dtd), dir, chan, dtd_get_priority(dtd),
dtd_get_next_chan(dtd));
 
@@ -595,8 +592,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)
pr_debug("word4: frame_width = %d, frame_height = %d\n",
dtd_get_frame_width(dtd), dtd_get_frame_height(dtd));
else
-   pr_debug("word4: desc_write_addr = 0x%08x, write_desc = %d, "
-   "drp_data = %d, use_desc_reg = %d\n",
+   pr_debug("word4: desc_write_addr = 0x%08x, write_desc = %d, 
drp_data = %d, use_desc_reg = %d\n",
dtd_get_desc_write_addr(dtd), dtd_get_write_desc(dtd),
dtd_get_drop_data(dtd), dtd_get_use_desc(dtd));
 
diff --git a/drivers/media/platform/ti-vpe/vpe.c 
b/drivers/media/platform/ti-vpe/vpe.c
index 0189f7f7cb03..1cf4a4c1b899 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/platform/ti-vpe/vpe.c
@@ -1263,8 +1263,7 @@ static irqreturn_t vpe_irq(int irq_vpe, void *data)
}
 
if (irqst0 | irqst1) {
-   dev_warn(dev->v4l2_dev.dev, "Unexpected interrupt: "
-   "INT0_STATUS0 = 0x%08x, INT0_STATUS1 = 0x%08x\n",
+   dev_warn(dev->v4l2_dev.dev, "Unexpected interrupt: INT0_STATUS0 
= 0x%08x, INT0_STATUS1 = 0x%08x\n",
irqst0, irqst1);
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 21/57] [media] tw68: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/tw68/tw68-video.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/media/pci/tw68/tw68-video.c 
b/drivers/media/pci/tw68/tw68-video.c
index a45e02367321..165d54925506 100644
--- a/drivers/media/pci/tw68/tw68-video.c
+++ b/drivers/media/pci/tw68/tw68-video.c
@@ -279,8 +279,7 @@ static int tw68_set_scale(struct tw68_dev *dev, unsigned 
int width,
height /= 2;/* we must set for 1-frame */
 
pr_debug("%s: width=%d, height=%d, both=%d\n"
-"  tvnorm h_delay=%d, h_start=%d, h_stop=%d, "
-"v_delay=%d, v_start=%d, v_stop=%d\n" , __func__,
+"  tvnorm h_delay=%d, h_start=%d, h_stop=%d, v_delay=%d, 
v_start=%d, v_stop=%d\n" , __func__,
width, height, V4L2_FIELD_HAS_BOTH(field),
norm->h_delay, norm->h_start, norm->h_stop,
norm->v_delay, norm->video_v_start,
@@ -309,16 +308,14 @@ static int tw68_set_scale(struct tw68_dev *dev, unsigned 
int width,
V4L2_FIELD_HAS_TOP(field)? "T" : "",
V4L2_FIELD_HAS_BOTTOM(field) ? "B" : "",
v4l2_norm_to_name(dev->tvnorm->id));
-   pr_debug("%s: hactive=%d, hdelay=%d, hscale=%d; "
-   "vactive=%d, vdelay=%d, vscale=%d\n", __func__,
+   pr_debug("%s: hactive=%d, hdelay=%d, hscale=%d; vactive=%d, vdelay=%d, 
vscale=%d\n", __func__,
hactive, hdelay, hscale, vactive, vdelay, vscale);
 
comb =  ((vdelay & 0x300)  >> 2) |
((vactive & 0x300) >> 4) |
((hdelay & 0x300)  >> 6) |
((hactive & 0x300) >> 8);
-   pr_debug("%s: setting CROP_HI=%02x, VDELAY_LO=%02x, "
-   "VACTIVE_LO=%02x, HDELAY_LO=%02x, HACTIVE_LO=%02x\n",
+   pr_debug("%s: setting CROP_HI=%02x, VDELAY_LO=%02x, VACTIVE_LO=%02x, 
HDELAY_LO=%02x, HACTIVE_LO=%02x\n",
__func__, comb, vdelay, vactive, hdelay, hactive);
tw_writeb(TW68_CROP_HI, comb);
tw_writeb(TW68_VDELAY_LO, vdelay & 0xff);
@@ -327,8 +324,7 @@ static int tw68_set_scale(struct tw68_dev *dev, unsigned 
int width,
tw_writeb(TW68_HACTIVE_LO, hactive & 0xff);
 
comb = ((vscale & 0xf00) >> 4) | ((hscale & 0xf00) >> 8);
-   pr_debug("%s: setting SCALE_HI=%02x, VSCALE_LO=%02x, "
-   "HSCALE_LO=%02x\n", __func__, comb, vscale, hscale);
+   pr_debug("%s: setting SCALE_HI=%02x, VSCALE_LO=%02x, HSCALE_LO=%02x\n", 
__func__, comb, vscale, hscale);
tw_writeb(TW68_SCALE_HI, comb);
tw_writeb(TW68_VSCALE_LO, vscale);
tw_writeb(TW68_HSCALE_LO, hscale);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 51/57] [media] v4l2-core: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/v4l2-core/v4l2-ioctl.c| 90 -
 drivers/media/v4l2-core/videobuf-core.c |  3 +-
 drivers/media/v4l2-core/videobuf2-core.c| 21 +++
 drivers/media/v4l2-core/videobuf2-v4l2.c|  9 +--
 drivers/media/v4l2-core/videobuf2-vmalloc.c |  3 +-
 5 files changed, 37 insertions(+), 89 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c 
b/drivers/media/v4l2-core/v4l2-ioctl.c
index c52d94c018bb..13b589a8955e 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -174,8 +174,7 @@ static void v4l_print_querycap(const void *arg, bool 
write_only)
 {
const struct v4l2_capability *p = arg;
 
-   pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, "
-   "capabilities=0x%08x, device_caps=0x%08x\n",
+   pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, 
capabilities=0x%08x, device_caps=0x%08x\n",
(int)sizeof(p->driver), p->driver,
(int)sizeof(p->card), p->card,
(int)sizeof(p->bus_info), p->bus_info,
@@ -186,8 +185,7 @@ static void v4l_print_enuminput(const void *arg, bool 
write_only)
 {
const struct v4l2_input *p = arg;
 
-   pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, tuner=%u, "
-   "std=0x%08Lx, status=0x%x, capabilities=0x%x\n",
+   pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, tuner=%u, 
std=0x%08Lx, status=0x%x, capabilities=0x%x\n",
p->index, (int)sizeof(p->name), p->name, p->type, p->audioset,
p->tuner, (unsigned long long)p->std, p->status,
p->capabilities);
@@ -197,8 +195,7 @@ static void v4l_print_enumoutput(const void *arg, bool 
write_only)
 {
const struct v4l2_output *p = arg;
 
-   pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, "
-   "modulator=%u, std=0x%08Lx, capabilities=0x%x\n",
+   pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, modulator=%u, 
std=0x%08Lx, capabilities=0x%x\n",
p->index, (int)sizeof(p->name), p->name, p->type, p->audioset,
p->modulator, (unsigned long long)p->std, p->capabilities);
 }
@@ -256,11 +253,7 @@ static void v4l_print_format(const void *arg, bool 
write_only)
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
pix = &p->fmt.pix;
-   pr_cont(", width=%u, height=%u, "
-   "pixelformat=%c%c%c%c, field=%s, "
-   "bytesperline=%u, sizeimage=%u, colorspace=%d, "
-   "flags=0x%x, ycbcr_enc=%u, quantization=%u, "
-   "xfer_func=%u\n",
+   pr_cont(", width=%u, height=%u, pixelformat=%c%c%c%c, field=%s, 
bytesperline=%u, sizeimage=%u, colorspace=%d, flags=0x%x, ycbcr_enc=%u, 
quantization=%u, xfer_func=%u\n",
pix->width, pix->height,
(pix->pixelformat & 0xff),
(pix->pixelformat >>  8) & 0xff,
@@ -274,10 +267,7 @@ static void v4l_print_format(const void *arg, bool 
write_only)
case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
mp = &p->fmt.pix_mp;
-   pr_cont(", width=%u, height=%u, "
-   "format=%c%c%c%c, field=%s, "
-   "colorspace=%d, num_planes=%u, flags=0x%x, "
-   "ycbcr_enc=%u, quantization=%u, xfer_func=%u\n",
+   pr_cont(", width=%u, height=%u, format=%c%c%c%c, field=%s, 
colorspace=%d, num_planes=%u, flags=0x%x, ycbcr_enc=%u, quantization=%u, 
xfer_func=%u\n",
mp->width, mp->height,
(mp->pixelformat & 0xff),
(mp->pixelformat >>  8) & 0xff,
@@ -306,8 +296,7 @@ static void v4l_print_format(const void *arg, bool 
write_only)
case V4L2_BUF_TYPE_VBI_CAPTURE:
case V4L2_BUF_TYPE_VBI_OUTPUT:
vbi = &p->fmt.vbi;
-   pr_cont(", sampling_rate=%u, offset=%u, samples_per_line=%u, "
-   "sample_format=%c%c%c%c, start=%u,%u, count=%u,%u\n",
+   pr_cont(", sampling_rate=%u, offset=%u, samples_per_line=%u, 
sample_format=%c%c%c%c, start=%u,%u, count=%u,%u\n",
vbi->sampling_rate, vbi->offset,
vbi->samples_per_line,
(vbi->sample_format & 0xff),
@@ -343,9 +332,7 @@ static void v4l_print_framebuffer(const void *arg, bool 
write_only)
 {
const struct v4l2_framebuffer *p = arg;
 
-   pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, "
-   "height=%u, pixelfor

[PATCH 53/57] [media] i2c: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/as3645a.c  | 9 +++--
 drivers/media/i2c/msp3400-kthreads.c | 3 +--
 drivers/media/i2c/mt9m032.c  | 3 +--
 drivers/media/i2c/mt9p031.c  | 3 +--
 drivers/media/i2c/saa7115.c  | 3 +--
 drivers/media/i2c/saa717x.c  | 3 +--
 drivers/media/i2c/ths8200.c  | 4 +---
 drivers/media/i2c/tvp5150.c  | 3 +--
 drivers/media/i2c/tvp7002.c  | 3 +--
 drivers/media/i2c/upd64083.c | 3 +--
 10 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/drivers/media/i2c/as3645a.c b/drivers/media/i2c/as3645a.c
index 2e90e4094b79..95fcb8f68a1a 100644
--- a/drivers/media/i2c/as3645a.c
+++ b/drivers/media/i2c/as3645a.c
@@ -299,8 +299,7 @@ static int as3645a_read_fault(struct as3645a *flash)
dev_dbg(&client->dev, "Inductor Peak limit fault\n");
 
if (rval & AS_FAULT_INFO_INDICATOR_LED)
-   dev_dbg(&client->dev, "Indicator LED fault: "
-   "Short circuit or open loop\n");
+   dev_dbg(&client->dev, "Indicator LED fault: Short circuit or 
open loop\n");
 
dev_dbg(&client->dev, "%u connected LEDs\n",
rval & AS_FAULT_INFO_LED_AMOUNT ? 2 : 1);
@@ -315,8 +314,7 @@ static int as3645a_read_fault(struct as3645a *flash)
dev_dbg(&client->dev, "Short circuit fault\n");
 
if (rval & AS_FAULT_INFO_OVER_VOLTAGE)
-   dev_dbg(&client->dev, "Over voltage fault: "
-   "Indicates missing capacitor or open connection\n");
+   dev_dbg(&client->dev, "Over voltage fault: Indicates missing 
capacitor or open connection\n");
 
return rval;
 }
@@ -588,8 +586,7 @@ static int as3645a_registered(struct v4l2_subdev *sd)
 
/* Verify the chip model and version. */
if (model != 0x01 || rfu != 0x00) {
-   dev_err(&client->dev, "AS3645A not detected "
-   "(model %d rfu %d)\n", model, rfu);
+   dev_err(&client->dev, "AS3645A not detected (model %d rfu 
%d)\n", model, rfu);
rval = -ENODEV;
goto power_off;
}
diff --git a/drivers/media/i2c/msp3400-kthreads.c 
b/drivers/media/i2c/msp3400-kthreads.c
index 17120804fab7..022bea68cbf0 100644
--- a/drivers/media/i2c/msp3400-kthreads.c
+++ b/drivers/media/i2c/msp3400-kthreads.c
@@ -775,8 +775,7 @@ int msp3410d_thread(void *data)
if (msp_amsound && !state->radio &&
(state->v4l2_std & V4L2_STD_SECAM) && (val != 0x0009)) {
/* autodetection has failed, let backup */
-   v4l_dbg(1, msp_debug, client, "autodetection failed,"
-   " switching to backup standard: %s (0x%04x)\n",
+   v4l_dbg(1, msp_debug, client, "autodetection failed, 
switching to backup standard: %s (0x%04x)\n",
msp_stdlist[8].name ?
msp_stdlist[8].name : "unknown", val);
state->std = val = 0x0009;
diff --git a/drivers/media/i2c/mt9m032.c b/drivers/media/i2c/mt9m032.c
index da076796999e..a045425887d5 100644
--- a/drivers/media/i2c/mt9m032.c
+++ b/drivers/media/i2c/mt9m032.c
@@ -746,8 +746,7 @@ static int mt9m032_probe(struct i2c_client *client,
 
chip_version = mt9m032_read(client, MT9M032_CHIP_VERSION);
if (chip_version != MT9M032_CHIP_VERSION_VALUE) {
-   dev_err(&client->dev, "MT9M032 not detected, wrong version "
-   "0x%04x\n", chip_version);
+   dev_err(&client->dev, "MT9M032 not detected, wrong version 
0x%04x\n", chip_version);
ret = -ENODEV;
goto error_sensor;
}
diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c
index 237737fec09c..4d7b56b96a92 100644
--- a/drivers/media/i2c/mt9p031.c
+++ b/drivers/media/i2c/mt9p031.c
@@ -929,8 +929,7 @@ static int mt9p031_registered(struct v4l2_subdev *subdev)
mt9p031_power_off(mt9p031);
 
if (data != MT9P031_CHIP_VERSION_VALUE) {
-   dev_err(&client->dev, "MT9P031 not detected, wrong version "
-   "0x%04x\n", data);
+   dev_err(&client->dev, "MT9P031 not detected, wrong version 
0x%04x\n", data);
return -ENODEV;
}
 
diff --git a/drivers/media/i2c/saa7115.c b/drivers/media/i2c/saa7115.c
index 58062b41c923..5db914b7d5ae 100644
--- a/drivers/media/i2c/saa7115.c
+++ b/drivers/media/i2c/saa7115.c
@@ -53,8 +53,7 @@
 #define VRES_60HZ  (480+16)
 
 MODULE_DESCRIPTION("Philips SAA7111/SAA7113/SAA7114/SAA7115/SAA7118 video 
decoder driver");
-MODULE_AUTHOR(  "Maxim Yevtyushkin, Kevi

[PATCH 26/57] [media] omap3isp: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/omap3isp/isp.c |  3 +--
 drivers/media/platform/omap3isp/ispccdc.c |  6 ++---
 drivers/media/platform/omap3isp/ispcsi2.c | 11 ++--
 drivers/media/platform/omap3isp/ispcsiphy.c   |  3 +--
 drivers/media/platform/omap3isp/isph3a_aewb.c |  6 ++---
 drivers/media/platform/omap3isp/isph3a_af.c   |  6 ++---
 drivers/media/platform/omap3isp/ispstat.c | 36 +--
 7 files changed, 22 insertions(+), 49 deletions(-)

diff --git a/drivers/media/platform/omap3isp/isp.c 
b/drivers/media/platform/omap3isp/isp.c
index 0321d84addc7..a9d4347bf100 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -480,8 +480,7 @@ void omap3isp_hist_dma_done(struct isp_device *isp)
omap3isp_stat_pcr_busy(&isp->isp_hist)) {
/* Histogram cannot be enabled in this frame anymore */
atomic_set(&isp->isp_hist.buf_err, 1);
-   dev_dbg(isp->dev, "hist: Out of synchronization with "
- "CCDC. Ignoring next buffer.\n");
+   dev_dbg(isp->dev, "hist: Out of synchronization with CCDC. 
Ignoring next buffer.\n");
}
 }
 
diff --git a/drivers/media/platform/omap3isp/ispccdc.c 
b/drivers/media/platform/omap3isp/ispccdc.c
index 882310eb45cc..3f8e71c8ea48 100644
--- a/drivers/media/platform/omap3isp/ispccdc.c
+++ b/drivers/media/platform/omap3isp/ispccdc.c
@@ -151,8 +151,7 @@ static int ccdc_lsc_validate_config(struct isp_ccdc_device 
*ccdc,
}
 
if (lsc_cfg->offset & 3) {
-   dev_dbg(isp->dev, "CCDC: LSC: Offset must be a multiple of "
-   "4\n");
+   dev_dbg(isp->dev, "CCDC: LSC: Offset must be a multiple of 
4\n");
return -EINVAL;
}
 
@@ -416,8 +415,7 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc,
return 0;
 
if (update != (OMAP3ISP_CCDC_CONFIG_LSC | OMAP3ISP_CCDC_TBL_LSC)) {
-   dev_dbg(to_device(ccdc), "%s: Both LSC configuration and table "
-   "need to be supplied\n", __func__);
+   dev_dbg(to_device(ccdc), "%s: Both LSC configuration and table 
need to be supplied\n", __func__);
return -EINVAL;
}
 
diff --git a/drivers/media/platform/omap3isp/ispcsi2.c 
b/drivers/media/platform/omap3isp/ispcsi2.c
index f75a1be29d84..53a7573ed2a5 100644
--- a/drivers/media/platform/omap3isp/ispcsi2.c
+++ b/drivers/media/platform/omap3isp/ispcsi2.c
@@ -753,8 +753,7 @@ void omap3isp_csi2_isr(struct isp_csi2_device *csi2)
 ISPCSI2_PHY_IRQSTATUS);
isp_reg_writel(isp, cpxio1_irqstatus,
   csi2->regs1, ISPCSI2_PHY_IRQSTATUS);
-   dev_dbg(isp->dev, "CSI2: ComplexIO Error IRQ "
-   "%x\n", cpxio1_irqstatus);
+   dev_dbg(isp->dev, "CSI2: ComplexIO Error IRQ %x\n", 
cpxio1_irqstatus);
pipe->error = true;
}
 
@@ -763,13 +762,7 @@ void omap3isp_csi2_isr(struct isp_csi2_device *csi2)
  ISPCSI2_IRQSTATUS_ECC_NO_CORRECTION_IRQ |
  ISPCSI2_IRQSTATUS_COMPLEXIO2_ERR_IRQ |
  ISPCSI2_IRQSTATUS_FIFO_OVF_IRQ)) {
-   dev_dbg(isp->dev, "CSI2 Err:"
-   " OCP:%d,"
-   " Short_pack:%d,"
-   " ECC:%d,"
-   " CPXIO2:%d,"
-   " FIFO_OVF:%d,"
-   "\n",
+   dev_dbg(isp->dev, "CSI2 Err: OCP:%d, Short_pack:%d, ECC:%d, 
CPXIO2:%d, FIFO_OVF:%d,\n",
(csi2_irqstatus &
 ISPCSI2_IRQSTATUS_OCP_ERR_IRQ) ? 1 : 0,
(csi2_irqstatus &
diff --git a/drivers/media/platform/omap3isp/ispcsiphy.c 
b/drivers/media/platform/omap3isp/ispcsiphy.c
index 495447d66cfd..f67fd2f09f00 100644
--- a/drivers/media/platform/omap3isp/ispcsiphy.c
+++ b/drivers/media/platform/omap3isp/ispcsiphy.c
@@ -267,8 +267,7 @@ int omap3isp_csiphy_acquire(struct isp_csiphy *phy)
int rval;
 
if (phy->vdd == NULL) {
-   dev_err(phy->isp->dev, "Power regulator for CSI PHY not "
-   "available\n");
+   dev_err(phy->isp->dev, "Power regulator for CSI PHY not 
available\n");
return -ENODEV;
}
 
diff --git a/drivers/media/platform/omap3isp/isph3a_aewb.c 
b/drivers/media/platform/omap3isp/isph3a_aewb.c
index ccaf92f39236..de9bb3ea032e 100644
--- a/drivers/media/platform/omap3isp/isph3a_aewb.c
+++ b/drivers/media/platform/omap3isp/isph3a_aewb.c
@@ -304,

[PATCH 25/57] [media] omap: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/omap/omap_vout.c  | 12 
 drivers/media/platform/omap/omap_vout_vrfb.c |  3 +--
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/omap/omap_vout.c 
b/drivers/media/platform/omap/omap_vout.c
index e668dde6d857..ab0b941c64a4 100644
--- a/drivers/media/platform/omap/omap_vout.c
+++ b/drivers/media/platform/omap/omap_vout.c
@@ -1657,8 +1657,7 @@ static int vidioc_streamoff(struct file *file, void *fh, 
enum v4l2_buf_type i)
/* Turn of the pipeline */
ret = omapvid_apply_changes(vout);
if (ret)
-   v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode in"
-   " streamoff\n");
+   v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode in 
streamoff\n");
 
INIT_LIST_HEAD(&vout->dma_queue);
ret = videobuf_streamoff(&vout->vbq);
@@ -1858,8 +1857,7 @@ static int __init omap_vout_setup_video_data(struct 
omap_vout_device *vout)
vfd = vout->vfd = video_device_alloc();
 
if (!vfd) {
-   printk(KERN_ERR VOUT_NAME ": could not allocate"
-   " video device struct\n");
+   printk(KERN_ERR VOUT_NAME ": could not allocate video device 
struct\n");
v4l2_ctrl_handler_free(hdl);
return -ENOMEM;
}
@@ -1984,16 +1982,14 @@ static int __init omap_vout_create_video_devices(struct 
platform_device *pdev)
 */
vfd = vout->vfd;
if (video_register_device(vfd, VFL_TYPE_GRABBER, -1) < 0) {
-   dev_err(&pdev->dev, ": Could not register "
-   "Video for Linux device\n");
+   dev_err(&pdev->dev, ": Could not register Video for 
Linux device\n");
vfd->minor = -1;
ret = -ENODEV;
goto error2;
}
video_set_drvdata(vfd, vout);
 
-   dev_info(&pdev->dev, ": registered and initialized"
-   " video device %d\n", vfd->minor);
+   dev_info(&pdev->dev, ": registered and initialized video device 
%d\n", vfd->minor);
if (k == (pdev->num_resources - 1))
return 0;
 
diff --git a/drivers/media/platform/omap/omap_vout_vrfb.c 
b/drivers/media/platform/omap/omap_vout_vrfb.c
index b8638e4e1627..19768f249192 100644
--- a/drivers/media/platform/omap/omap_vout_vrfb.c
+++ b/drivers/media/platform/omap/omap_vout_vrfb.c
@@ -139,8 +139,7 @@ int omap_vout_setup_vrfb_bufs(struct platform_device *pdev, 
int vid_num,
(void *) &vout->vrfb_dma_tx, &vout->vrfb_dma_tx.dma_ch);
if (ret < 0) {
vout->vrfb_dma_tx.req_status = DMA_CHAN_NOT_ALLOTED;
-   dev_info(&pdev->dev, ": failed to allocate DMA Channel for"
-   " video%d\n", vfd->minor);
+   dev_info(&pdev->dev, ": failed to allocate DMA Channel for 
video%d\n", vfd->minor);
}
init_waitqueue_head(&vout->vrfb_dma_tx.wait);
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 10/57] [media] cx23885: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/cx23885/cimax2.c|  4 +---
 drivers/media/pci/cx23885/cx23885-417.c   | 15 +--
 drivers/media/pci/cx23885/cx23885-alsa.c  | 12 
 drivers/media/pci/cx23885/cx23885-cards.c |  7 ++-
 drivers/media/pci/cx23885/cx23885-core.c  | 12 
 drivers/media/pci/cx23885/cx23885-dvb.c   |  3 +--
 drivers/media/pci/cx23885/cx23885-video.c |  3 +--
 drivers/media/pci/cx23885/cx23888-ir.c|  6 ++
 8 files changed, 20 insertions(+), 42 deletions(-)

diff --git a/drivers/media/pci/cx23885/cimax2.c 
b/drivers/media/pci/cx23885/cimax2.c
index 631e4f24aea6..fdc54f0e60c6 100644
--- a/drivers/media/pci/cx23885/cimax2.c
+++ b/drivers/media/pci/cx23885/cimax2.c
@@ -365,9 +365,7 @@ static void netup_read_ci_status(struct work_struct *work)
if (ret != 0)
return;
 
-   ci_dbg_print("%s: Slot Status Addr=[0x%04x], "
-   "Reg=[0x%02x], data=%02x, "
-   "TS config = %02x\n", __func__,
+   ci_dbg_print("%s: Slot Status Addr=[0x%04x], Reg=[0x%02x], 
data=%02x, TS config = %02x\n", __func__,
state->ci_i2c_addr, 0, buf[0],
buf[0]);
 
diff --git a/drivers/media/pci/cx23885/cx23885-417.c 
b/drivers/media/pci/cx23885/cx23885-417.c
index da892f3e3c29..ab3c99e7cb8b 100644
--- a/drivers/media/pci/cx23885/cx23885-417.c
+++ b/drivers/media/pci/cx23885/cx23885-417.c
@@ -770,8 +770,7 @@ static int cx23885_mbox_func(void *priv,
mc417_memory_read(dev, dev->cx23417_mailbox - 4, &value);
if (value != 0x12345678) {
printk(KERN_ERR
-   "Firmware and/or mailbox pointer not initialized "
-   "or corrupted, signature = 0x%x, cmd = %s\n", value,
+   "Firmware and/or mailbox pointer not initialized or 
corrupted, signature = 0x%x, cmd = %s\n", value,
cmd_to_str(command));
return -1;
}
@@ -781,8 +780,7 @@ static int cx23885_mbox_func(void *priv,
 */
mc417_memory_read(dev, dev->cx23417_mailbox, &flag);
if (flag) {
-   printk(KERN_ERR "ERROR: Mailbox appears to be in use "
-   "(%x), cmd = %s\n", flag, cmd_to_str(command));
+   printk(KERN_ERR "ERROR: Mailbox appears to be in use (%x), cmd 
= %s\n", flag, cmd_to_str(command));
return -1;
}
 
@@ -935,14 +933,12 @@ static int cx23885_load_firmware(struct cx23885_dev *dev)
printk(KERN_ERR
"ERROR: Hotplug firmware request failed (%s).\n",
CX23885_FIRM_IMAGE_NAME);
-   printk(KERN_ERR "Please fix your hotplug setup, the board will "
-   "not work without firmware loaded!\n");
+   printk(KERN_ERR "Please fix your hotplug setup, the board will 
not work without firmware loaded!\n");
return -1;
}
 
if (firmware->size != CX23885_FIRM_IMAGE_SIZE) {
-   printk(KERN_ERR "ERROR: Firmware size mismatch "
-   "(have %zu, expected %d)\n",
+   printk(KERN_ERR "ERROR: Firmware size mismatch (have %zu, 
expected %d)\n",
firmware->size, CX23885_FIRM_IMAGE_SIZE);
release_firmware(firmware);
return -1;
@@ -1077,8 +1073,7 @@ static int cx23885_initialize_codec(struct cx23885_dev 
*dev, int startencoder)
retval = cx23885_api_cmd(dev, CX2341X_ENC_GET_VERSION, 0, 1,
&version);
if (retval < 0) {
-   printk(KERN_ERR "ERROR: cx23417 firmware get encoder :"
-   "version failed!\n");
+   printk(KERN_ERR "ERROR: cx23417 firmware get encoder 
:version failed!\n");
return -1;
}
dprintk(1, "cx23417 firmware version is 0x%08x\n", version);
diff --git a/drivers/media/pci/cx23885/cx23885-alsa.c 
b/drivers/media/pci/cx23885/cx23885-alsa.c
index 6115d4e148ba..3404f1e584a8 100644
--- a/drivers/media/pci/cx23885/cx23885-alsa.c
+++ b/drivers/media/pci/cx23885/cx23885-alsa.c
@@ -186,8 +186,7 @@ static int cx23885_start_audio_dma(struct cx23885_audio_dev 
*chip)
cx_write(AUD_INT_A_GPCNT_CTL, GP_COUNT_CONTROL_RESET);
atomic_set(&chip->count, 0);
 
-   dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d "
-   "byte buffer\n", buf->bpl, cx_read(audio_ch->cmds_start+12)>>1,
+   dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d 
byte

[PATCH 15/57] [media] meye: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/meye/meye.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index ba887e8e1b17..11d81389ab1e 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -60,8 +60,7 @@ MODULE_PARM_DESC(gbuffers, "number of capture buffers, 
default is 2 (32 max)");
 /* size of a grab buffer */
 static unsigned int gbufsize = MEYE_MAX_BUFSIZE;
 module_param(gbufsize, int, 0444);
-MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 614400"
-" (will be rounded up to a page multiple)");
+MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 614400 
(will be rounded up to a page multiple)");
 
 /* /dev/videoX registration number */
 static int video_nr = -1;
@@ -1261,8 +1260,7 @@ static int vidioc_reqbufs(struct file *file, void *fh,
meye.grab_fbuffer = rvmalloc(gbuffers * gbufsize);
 
if (!meye.grab_fbuffer) {
-   printk(KERN_ERR "meye: v4l framebuffer allocation"
-   " failed\n");
+   printk(KERN_ERR "meye: v4l framebuffer allocation failed\n");
mutex_unlock(&meye.lock);
return -ENOMEM;
}
@@ -1659,8 +1657,7 @@ static int meye_probe(struct pci_dev *pcidev, const 
struct pci_device_id *ent)
ret = -EIO;
if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
v4l2_err(v4l2_dev, "meye: unable to power on the camera\n");
-   v4l2_err(v4l2_dev, "meye: did you enable the camera in "
-   "sonypi using the module options ?\n");
+   v4l2_err(v4l2_dev, "meye: did you enable the camera in sonypi 
using the module options ?\n");
goto outsonypienable;
}
 
@@ -1834,8 +1831,7 @@ static int __init meye_init(void)
if (gbufsize > MEYE_MAX_BUFSIZE)
gbufsize = MEYE_MAX_BUFSIZE;
gbufsize = PAGE_ALIGN(gbufsize);
-   printk(KERN_INFO "meye: using %d buffers with %dk (%dk total) "
-"for capture\n",
+   printk(KERN_INFO "meye: using %d buffers with %dk (%dk total) for 
capture\n",
 gbuffers,
 gbufsize / 1024, gbuffers * gbufsize / 1024);
return pci_register_driver(&meye_driver);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 16/57] [media] pt1: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/pt1/pt1.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c
index e7e4428109c3..aad2acf90177 100644
--- a/drivers/media/pci/pt1/pt1.c
+++ b/drivers/media/pci/pt1/pt1.c
@@ -282,13 +282,11 @@ static int pt1_filter(struct pt1 *pt1, struct 
pt1_buffer_page *page)
continue;
 
if (upacket >> 24 & 1)
-   printk_ratelimited(KERN_INFO "earth-pt1: device "
-   "buffer overflowing. table[%d] buf[%d]\n",
+   printk_ratelimited(KERN_INFO "earth-pt1: device buffer 
overflowing. table[%d] buf[%d]\n",
pt1->table_index, pt1->buf_index);
sc = upacket >> 26 & 0x7;
if (adap->st_count != -1 && sc != ((adap->st_count + 1) & 0x7))
-   printk_ratelimited(KERN_INFO "earth-pt1: data loss"
-   " in streamID(adapter)[%d]\n", index);
+   printk_ratelimited(KERN_INFO "earth-pt1: data loss in 
streamID(adapter)[%d]\n", index);
adap->st_count = sc;
 
buf = adap->buf;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 43/57] [media] siano: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/siano/smsusb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
index c2e25876e93b..feace863e8d5 100644
--- a/drivers/media/usb/siano/smsusb.c
+++ b/drivers/media/usb/siano/smsusb.c
@@ -604,8 +604,7 @@ static int smsusb_resume(struct usb_interface *intf)
   intf->cur_altsetting->desc.
   bInterfaceNumber, 0);
if (rc < 0) {
-   printk(KERN_INFO "%s usb_set_interface failed, "
-  "rc %d\n", __func__, rc);
+   printk(KERN_INFO "%s usb_set_interface failed, rc 
%d\n", __func__, rc);
return rc;
}
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 54/57] [media] platform: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/mx2_emmaprp.c | 3 +--
 drivers/media/platform/pxa_camera.c  | 6 ++
 drivers/media/platform/via-camera.c  | 7 ++-
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/media/platform/mx2_emmaprp.c 
b/drivers/media/platform/mx2_emmaprp.c
index e68d271b10af..ea572718a638 100644
--- a/drivers/media/platform/mx2_emmaprp.c
+++ b/drivers/media/platform/mx2_emmaprp.c
@@ -724,8 +724,7 @@ static int emmaprp_buf_prepare(struct vb2_buffer *vb)
q_data = get_q_data(ctx, vb->vb2_queue->type);
 
if (vb2_plane_size(vb, 0) < q_data->sizeimage) {
-   dprintk(ctx->dev, "%s data will not fit into plane"
- "(%lu < %lu)\n", __func__,
+   dprintk(ctx->dev, "%s data will not fit into plane(%lu < 
%lu)\n", __func__,
  vb2_plane_size(vb, 0),
  (long)q_data->sizeimage);
return -EINVAL;
diff --git a/drivers/media/platform/pxa_camera.c 
b/drivers/media/platform/pxa_camera.c
index c12209c701d3..bcdac4932fb1 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -2347,8 +2347,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
 * Platform hasn't set available data widths. This is bad.
 * Warn and use a default.
 */
-   dev_warn(&pdev->dev, "WARNING! Platform hasn't set available "
-"data widths, using default 10 bit\n");
+   dev_warn(&pdev->dev, "WARNING! Platform hasn't set available 
data widths, using default 10 bit\n");
pcdev->platform_flags |= PXA_CAMERA_DATAWIDTH_10;
}
if (pcdev->platform_flags & PXA_CAMERA_DATAWIDTH_8)
@@ -2359,8 +2358,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
pcdev->width_flags |= 1 << 9;
if (!pcdev->mclk) {
dev_warn(&pdev->dev,
-"mclk == 0! Please, fix your platform data. "
-"Using default 20MHz\n");
+"mclk == 0! Please, fix your platform data. Using 
default 20MHz\n");
pcdev->mclk = 2000;
}
 
diff --git a/drivers/media/platform/via-camera.c 
b/drivers/media/platform/via-camera.c
index 7ca12deba89c..e16f70a5df1d 100644
--- a/drivers/media/platform/via-camera.c
+++ b/drivers/media/platform/via-camera.c
@@ -39,15 +39,12 @@ MODULE_LICENSE("GPL");
 static bool flip_image;
 module_param(flip_image, bool, 0444);
 MODULE_PARM_DESC(flip_image,
-   "If set, the sensor will be instructed to flip the image "
-   "vertically.");
+   "If set, the sensor will be instructed to flip the image 
vertically.");
 
 static bool override_serial;
 module_param(override_serial, bool, 0444);
 MODULE_PARM_DESC(override_serial,
-   "The camera driver will normally refuse to load if "
-   "the XO 1.5 serial port is enabled.  Set this option "
-   "to force-enable the camera.");
+   "The camera driver will normally refuse to load if the XO 1.5 
serial port is enabled.  Set this option to force-enable the camera.");
 
 /*
  * The structure describing our camera.
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 30/57] [media] si470x: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/si470x/radio-si470x-i2c.c |  6 ++
 drivers/media/radio/si470x/radio-si470x-usb.c | 12 
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c 
b/drivers/media/radio/si470x/radio-si470x-i2c.c
index ee0470a3196b..ba622439f121 100644
--- a/drivers/media/radio/si470x/radio-si470x-i2c.c
+++ b/drivers/media/radio/si470x/radio-si470x-i2c.c
@@ -387,8 +387,7 @@ static int si470x_i2c_probe(struct i2c_client *client,
radio->registers[DEVICEID], 
radio->registers[SI_CHIPID]);
if ((radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE) < 
RADIO_FW_VERSION) {
dev_warn(&client->dev,
-   "This driver is known to work with "
-   "firmware version %hu,\n", RADIO_FW_VERSION);
+   "This driver is known to work with firmware version 
%hu,\n", RADIO_FW_VERSION);
dev_warn(&client->dev,
"but the device has firmware version %hu.\n",
radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE);
@@ -400,8 +399,7 @@ static int si470x_i2c_probe(struct i2c_client *client,
dev_warn(&client->dev,
"If you have some trouble using this driver,\n");
dev_warn(&client->dev,
-   "please report to V4L ML at "
-   "linux-media@vger.kernel.org\n");
+   "please report to V4L ML at 
linux-media@vger.kernel.org\n");
}
 
/* set initial frequency */
diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c 
b/drivers/media/radio/si470x/radio-si470x-usb.c
index 4b132c29f290..18e0c7ec2056 100644
--- a/drivers/media/radio/si470x/radio-si470x-usb.c
+++ b/drivers/media/radio/si470x/radio-si470x-usb.c
@@ -351,8 +351,7 @@ static int si470x_get_scratch_page_versions(struct 
si470x_device *radio)
retval = si470x_get_report(radio, radio->usb_buf, SCRATCH_REPORT_SIZE);
 
if (retval < 0)
-   dev_warn(&radio->intf->dev, "si470x_get_scratch: "
-   "si470x_get_report returned %d\n", retval);
+   dev_warn(&radio->intf->dev, "si470x_get_scratch: 
si470x_get_report returned %d\n", retval);
else {
radio->software_version = radio->usb_buf[1];
radio->hardware_version = radio->usb_buf[2];
@@ -688,8 +687,7 @@ static int si470x_usb_driver_probe(struct usb_interface 
*intf,
radio->registers[DEVICEID], 
radio->registers[SI_CHIPID]);
if ((radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE) < 
RADIO_FW_VERSION) {
dev_warn(&intf->dev,
-   "This driver is known to work with "
-   "firmware version %hu,\n", RADIO_FW_VERSION);
+   "This driver is known to work with firmware version 
%hu,\n", RADIO_FW_VERSION);
dev_warn(&intf->dev,
"but the device has firmware version %hu.\n",
radio->registers[SI_CHIPID] & SI_CHIPID_FIRMWARE);
@@ -705,8 +703,7 @@ static int si470x_usb_driver_probe(struct usb_interface 
*intf,
radio->software_version, radio->hardware_version);
if (radio->hardware_version < RADIO_HW_VERSION) {
dev_warn(&intf->dev,
-   "This driver is known to work with "
-   "hardware version %hu,\n", RADIO_HW_VERSION);
+   "This driver is known to work with hardware version 
%hu,\n", RADIO_HW_VERSION);
dev_warn(&intf->dev,
"but the device has hardware version %hu.\n",
radio->hardware_version);
@@ -718,8 +715,7 @@ static int si470x_usb_driver_probe(struct usb_interface 
*intf,
dev_warn(&intf->dev,
"If you have some trouble using this driver,\n");
dev_warn(&intf->dev,
-   "please report to V4L ML at "
-   "linux-media@vger.kernel.org\n");
+   "please report to V4L ML at 
linux-media@vger.kernel.org\n");
}
 
/* set led to connect state */
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 42/57] [media] pwc: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/pwc/pwc-if.c  | 3 +--
 drivers/media/usb/pwc/pwc-v4l.c | 6 ++
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index ff657644b6b3..aba3d4fad388 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -238,8 +238,7 @@ static void pwc_frame_complete(struct pwc_device *pdev)
} else {
/* Check for underflow first */
if (fbuf->filled < pdev->frame_total_size) {
-   PWC_DEBUG_FLOW("Frame buffer underflow (%d bytes);"
-  " discarded.\n", fbuf->filled);
+   PWC_DEBUG_FLOW("Frame buffer underflow (%d bytes); 
discarded.\n", fbuf->filled);
} else {
fbuf->vb.field = V4L2_FIELD_NONE;
fbuf->vb.sequence = pdev->vframe_count;
diff --git a/drivers/media/usb/pwc/pwc-v4l.c b/drivers/media/usb/pwc/pwc-v4l.c
index 3d987984602f..92f04db6bbae 100644
--- a/drivers/media/usb/pwc/pwc-v4l.c
+++ b/drivers/media/usb/pwc/pwc-v4l.c
@@ -406,8 +406,7 @@ static void pwc_vidioc_fill_fmt(struct v4l2_format *f,
f->fmt.pix.bytesperline = f->fmt.pix.width;
f->fmt.pix.sizeimage= f->fmt.pix.height * f->fmt.pix.width * 3 / 2;
f->fmt.pix.colorspace   = V4L2_COLORSPACE_SRGB;
-   PWC_DEBUG_IOCTL("pwc_vidioc_fill_fmt() "
-   "width=%d, height=%d, bytesperline=%d, sizeimage=%d, 
pixelformat=%c%c%c%c\n",
+   PWC_DEBUG_IOCTL("pwc_vidioc_fill_fmt() width=%d, height=%d, 
bytesperline=%d, sizeimage=%d, pixelformat=%c%c%c%c\n",
f->fmt.pix.width,
f->fmt.pix.height,
f->fmt.pix.bytesperline,
@@ -473,8 +472,7 @@ static int pwc_s_fmt_vid_cap(struct file *file, void *fh, 
struct v4l2_format *f)
 
pixelformat = f->fmt.pix.pixelformat;
 
-   PWC_DEBUG_IOCTL("Trying to set format to: width=%d height=%d fps=%d "
-   "format=%c%c%c%c\n",
+   PWC_DEBUG_IOCTL("Trying to set format to: width=%d height=%d fps=%d 
format=%c%c%c%c\n",
f->fmt.pix.width, f->fmt.pix.height, pdev->vframes,
(pixelformat)&255,
(pixelformat>>8)&255,
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 48/57] [media] usbvision: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/usbvision/usbvision-core.c  | 15 +--
 drivers/media/usb/usbvision/usbvision-video.c |  3 +--
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/media/usb/usbvision/usbvision-core.c 
b/drivers/media/usb/usbvision/usbvision-core.c
index c23bf73a68ea..4aed365da61d 100644
--- a/drivers/media/usb/usbvision/usbvision-core.c
+++ b/drivers/media/usb/usbvision/usbvision-core.c
@@ -1656,8 +1656,7 @@ static int usbvision_set_video_format(struct 
usb_usbvision *usbvision, int forma
 (__u16) USBVISION_FILT_CONT, value, 2, HZ);
 
if (rc < 0) {
-   printk(KERN_ERR "%s: ERROR=%d. USBVISION stopped - "
-  "reconnect or reload driver.\n", proc, rc);
+   printk(KERN_ERR "%s: ERROR=%d. USBVISION stopped - reconnect or 
reload driver.\n", proc, rc);
}
usbvision->isoc_mode = format;
return rc;
@@ -1890,8 +1889,7 @@ static int usbvision_set_compress_params(struct 
usb_usbvision *usbvision)
 (__u16) USBVISION_INTRA_CYC, value, 5, HZ);
 
if (rc < 0) {
-   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - "
-  "reconnect or reload driver.\n", proc, rc);
+   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or 
reload driver.\n", proc, rc);
return rc;
}
 
@@ -1921,8 +1919,7 @@ static int usbvision_set_compress_params(struct 
usb_usbvision *usbvision)
 (__u16) USBVISION_PCM_THR1, value, 6, HZ);
 
if (rc < 0) {
-   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - "
-  "reconnect or reload driver.\n", proc, rc);
+   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or 
reload driver.\n", proc, rc);
}
return rc;
 }
@@ -1960,8 +1957,7 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
 
rc = usbvision_write_reg(usbvision, USBVISION_VIN_REG1, value[0]);
if (rc < 0) {
-   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - "
-  "reconnect or reload driver.\n", proc, rc);
+   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or 
reload driver.\n", proc, rc);
return rc;
}
 
@@ -2026,8 +2022,7 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
 USB_DIR_OUT | USB_TYPE_VENDOR | 
USB_RECIP_ENDPOINT, 0,
 (__u16) USBVISION_LXSIZE_I, value, 8, HZ);
if (rc < 0) {
-   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - "
-  "reconnect or reload driver.\n", proc, rc);
+   printk(KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or 
reload driver.\n", proc, rc);
return rc;
}
 
diff --git a/drivers/media/usb/usbvision/usbvision-video.c 
b/drivers/media/usb/usbvision/usbvision-video.c
index c8b4eb2ee7a2..74d3fb6a48ba 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -1456,8 +1456,7 @@ static int usbvision_probe(struct usb_interface *intf,
}
 
if (interface->desc.bNumEndpoints < 2) {
-   dev_err(&intf->dev, "interface %d has %d endpoints, but must"
-   " have minimum 2\n", ifnum, interface->desc.bNumEndpoints);
+   dev_err(&intf->dev, "interface %d has %d endpoints, but must 
have minimum 2\n", ifnum, interface->desc.bNumEndpoints);
ret = -ENODEV;
goto err_usb;
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 37/57] [media] dvb-usb: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/dvb-usb/cinergyT2-core.c   |  6 ++
 drivers/media/usb/dvb-usb/dib0700_core.c |  5 +
 drivers/media/usb/dvb-usb/dib0700_devices.c  |  3 +--
 drivers/media/usb/dvb-usb/dvb-usb-dvb.c  |  3 +--
 drivers/media/usb/dvb-usb/dvb-usb-firmware.c |  6 ++
 drivers/media/usb/dvb-usb/dw2102.c   | 10 ++
 drivers/media/usb/dvb-usb/friio.c|  3 +--
 drivers/media/usb/dvb-usb/gp8psk.c   |  3 +--
 drivers/media/usb/dvb-usb/opera1.c   |  3 +--
 drivers/media/usb/dvb-usb/technisat-usb2.c   |  3 +--
 10 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/cinergyT2-core.c 
b/drivers/media/usb/dvb-usb/cinergyT2-core.c
index 9fd1527494eb..f4d9122245ac 100644
--- a/drivers/media/usb/dvb-usb/cinergyT2-core.c
+++ b/drivers/media/usb/dvb-usb/cinergyT2-core.c
@@ -34,8 +34,7 @@
 int dvb_usb_cinergyt2_debug;
 
 module_param_named(debug, dvb_usb_cinergyt2_debug, int, 0644);
-MODULE_PARM_DESC(debug, "set debugging level (1=info, xfer=2, rc=4 "
-   "(or-able)).");
+MODULE_PARM_DESC(debug, "set debugging level (1=info, xfer=2, rc=4 
(or-able)).");
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
@@ -74,8 +73,7 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter 
*adap)
ret = dvb_usb_generic_rw(adap->dev, query, sizeof(query), state,
sizeof(state), 0);
if (ret < 0) {
-   deb_rc("cinergyt2_power_ctrl() Failed to retrieve sleep "
-   "state info\n");
+   deb_rc("cinergyt2_power_ctrl() Failed to retrieve sleep state 
info\n");
}
 
/* Copy this pointer as we are gonna need it in the release phase */
diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c 
b/drivers/media/usb/dvb-usb/dib0700_core.c
index f3196658fb70..855cfc7bf309 100644
--- a/drivers/media/usb/dvb-usb/dib0700_core.c
+++ b/drivers/media/usb/dvb-usb/dib0700_core.c
@@ -16,10 +16,7 @@ MODULE_PARM_DESC(debug, "set debugging level 
(1=info,2=fw,4=fwdata,8=data (or-ab
 static int nb_packet_buffer_size = 21;
 module_param(nb_packet_buffer_size, int, 0644);
 MODULE_PARM_DESC(nb_packet_buffer_size,
-   "Set the dib0700 driver data buffer size. This parameter "
-   "corresponds to the number of TS packets. The actual size of "
-   "the data buffer corresponds to this parameter "
-   "multiplied by 188 (default: 21)");
+   "Set the dib0700 driver data buffer size. This parameter corresponds to 
the number of TS packets. The actual size of the data buffer corresponds to 
this parameter multiplied by 188 (default: 21)");
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c 
b/drivers/media/usb/dvb-usb/dib0700_devices.c
index 0857b56e652c..5668d8d69917 100644
--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -26,8 +26,7 @@
 
 static int force_lna_activation;
 module_param(force_lna_activation, int, 0644);
-MODULE_PARM_DESC(force_lna_activation, "force the activation of 
Low-Noise-Amplifyer(s) (LNA), "
-   "if applicable for the device (default: 0=automatic/off).");
+MODULE_PARM_DESC(force_lna_activation, "force the activation of 
Low-Noise-Amplifyer(s) (LNA), if applicable for the device (default: 
0=automatic/off).");
 
 struct dib0700_adapter_state {
int (*set_param_save) (struct dvb_frontend *);
diff --git a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c 
b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
index a04c0a250625..e5675da286cb 100644
--- a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
+++ b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
@@ -277,8 +277,7 @@ int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter 
*adap)
for (i = 0; i < adap->props.num_frontends; i++) {
 
if (adap->props.fe[i].frontend_attach == NULL) {
-   err("strange: '%s' #%d,%d "
-   "doesn't want to attach a frontend.",
+   err("strange: '%s' #%d,%d doesn't want to attach a 
frontend.",
adap->dev->desc->name, adap->id, i);
 
return 0;
diff --git a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c 
b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c
index dd048a7c461c..f0023dbb7276 100644
--- a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c
+++ b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c
@@ -49,8 +49,7 @@ int usb_cypress_load_firmware(struct usb_device *udev, const 
struct firmware *fw
ret = usb_cypress_writemem(udev,hx.addr,hx.data,hx.len);
 
if (ret != hx.len) {
-   err("error while transferring firmware

[PATCH 32/57] [media] wl128x: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/wl128x/fmdrv_common.c | 21 +++--
 drivers/media/radio/wl128x/fmdrv_rx.c |  6 ++
 2 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/drivers/media/radio/wl128x/fmdrv_common.c 
b/drivers/media/radio/wl128x/fmdrv_common.c
index 642b89c66bcb..db7c1c549fcf 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -230,8 +230,7 @@ inline void dump_rx_skb_data(struct sk_buff *skb)
struct fm_event_msg_hdr *evt_hdr;
 
evt_hdr = (struct fm_event_msg_hdr *)skb->data;
-   printk(KERN_INFO ">> hdr:%02x len:%02x sts:%02x numhci:%02x "
-   "opcode:%02x type:%s dlen:%02x", evt_hdr->hdr, evt_hdr->len,
+   printk(KERN_INFO ">> hdr:%02x len:%02x sts:%02x numhci:%02x opcode:%02x 
type:%s dlen:%02x", evt_hdr->hdr, evt_hdr->len,
evt_hdr->status, evt_hdr->num_fm_hci_cmds, evt_hdr->op,
(evt_hdr->rd_wr) ? "RD" : "WR", evt_hdr->dlen);
 
@@ -271,8 +270,7 @@ static void recv_tasklet(unsigned long arg)
/* Process all packets in the RX queue */
while ((skb = skb_dequeue(&fmdev->rx_q))) {
if (skb->len < sizeof(struct fm_event_msg_hdr)) {
-   fmerr("skb(%p) has only %d bytes, "
-   "at least need %zu bytes to decode\n", skb,
+   fmerr("skb(%p) has only %d bytes, at least need %zu 
bytes to decode\n", skb,
skb->len, sizeof(struct fm_event_msg_hdr));
kfree_skb(skb);
continue;
@@ -472,8 +470,7 @@ int fmc_send_cmd(struct fmdev *fmdev, u8 fm_op, u16 type, 
void *payload,
 
if (!wait_for_completion_timeout(&fmdev->maintask_comp,
 FM_DRV_TX_TIMEOUT)) {
-   fmerr("Timeout(%d sec),didn't get reg"
-  "completion signal from RX tasklet\n",
+   fmerr("Timeout(%d sec),didn't get regcompletion signal from RX 
tasklet\n",
   jiffies_to_msecs(FM_DRV_TX_TIMEOUT) / 1000);
return -ETIMEDOUT;
}
@@ -523,8 +520,7 @@ static inline int check_cmdresp_status(struct fmdev *fmdev,
 
fm_evt_hdr = (void *)(*skb)->data;
if (fm_evt_hdr->status != 0) {
-   fmerr("irq: opcode %x response status is not zero "
-   "Initiating irq recovery process\n",
+   fmerr("irq: opcode %x response status is not zero Initiating 
irq recovery process\n",
fm_evt_hdr->op);
 
mod_timer(&fmdev->irq_info.timer, jiffies + FM_DRV_TX_TIMEOUT);
@@ -564,8 +560,7 @@ static void int_timeout_handler(unsigned long data)
 * reset stage index & retry count values */
fmirq->stage = 0;
fmirq->retry = 0;
-   fmerr("Recovery action failed during"
-   "irq processing, max retry reached\n");
+   fmerr("Recovery action failed duringirq processing, max retry 
reached\n");
return;
}
fm_irq_call_stage(fmdev, FM_SEND_INTMSK_CMD_IDX);
@@ -1516,14 +1511,12 @@ int fmc_prepare(struct fmdev *fmdev)
 
if (!wait_for_completion_timeout(&wait_for_fmdrv_reg_comp,
 FM_ST_REG_TIMEOUT)) {
-   fmerr("Timeout(%d sec), didn't get reg "
-   "completion signal from ST\n",
+   fmerr("Timeout(%d sec), didn't get reg completion 
signal from ST\n",
jiffies_to_msecs(FM_ST_REG_TIMEOUT) / 
1000);
return -ETIMEDOUT;
}
if (fmdev->streg_cbdata != 0) {
-   fmerr("ST reg comp CB called with error "
-   "status %d\n", fmdev->streg_cbdata);
+   fmerr("ST reg comp CB called with error status %d\n", 
fmdev->streg_cbdata);
return -EAGAIN;
}
 
diff --git a/drivers/media/radio/wl128x/fmdrv_rx.c 
b/drivers/media/radio/wl128x/fmdrv_rx.c
index cfaeb2417fbb..84dfad13e4df 100644
--- a/drivers/media/radio/wl128x/fmdrv_rx.c
+++ b/drivers/media/radio/wl128x/fmdrv_rx.c
@@ -120,8 +120,7 @@ int fm_rx_set_freq(struct fmdev *fmdev, u32 freq)
curr_frq_in_khz = (fmdev->rx.region.bot_freq + ((u32)curr_frq * 
FM_FREQ_MUL));
 
if (curr_frq_in_khz != freq) {
-   pr_info("Frequency is set to (%d) but "
-  "requested freq is (%d)\n", curr_frq_in_khz, freq);
+   pr_info("Freq

[PATCH 41/57] [media] pvrusb2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/pvrusb2/pvrusb2-audio.c   |   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c|   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c |   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-debugifc.c|   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-eeprom.c  |   6 +-
 drivers/media/usb/pvrusb2/pvrusb2-encoder.c |  28 +---
 drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 175 +++-
 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c|  33 ++---
 drivers/media/usb/pvrusb2/pvrusb2-io.c  |  33 ++---
 drivers/media/usb/pvrusb2/pvrusb2-ioread.c  |  33 ++---
 drivers/media/usb/pvrusb2/pvrusb2-std.c |   3 +-
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c|   9 +-
 drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c   |   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-wm8775.c  |   3 +-
 14 files changed, 104 insertions(+), 239 deletions(-)

diff --git a/drivers/media/usb/pvrusb2/pvrusb2-audio.c 
b/drivers/media/usb/pvrusb2/pvrusb2-audio.c
index 5f953d837bf1..3bac50a248d4 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-audio.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-audio.c
@@ -74,9 +74,7 @@ void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct 
v4l2_subdev *sd)
input = sp->def[hdw->input_val];
} else {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
-  "*** WARNING *** subdev msp3400 set_input:"
-  " Invalid routing scheme (%u)"
-  " and/or input (%d)",
+  "*** WARNING *** subdev msp3400 set_input: 
Invalid routing scheme (%u) and/or input (%d)",
   sid, hdw->input_val);
return;
}
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c 
b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
index f82f0f0f2c04..7f29a0464f36 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
@@ -72,9 +72,7 @@ void pvr2_cs53l32a_subdev_update(struct pvr2_hdw *hdw, struct 
v4l2_subdev *sd)
(hdw->input_val < 0) ||
(hdw->input_val >= sp->cnt)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
-  "*** WARNING *** subdev v4l2 set_input:"
-  " Invalid routing scheme (%u)"
-  " and/or input (%d)",
+  "*** WARNING *** subdev v4l2 set_input: 
Invalid routing scheme (%u) and/or input (%d)",
   sid, hdw->input_val);
return;
}
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c 
b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
index 7d675fae1846..30eef97ef2ef 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -137,9 +137,7 @@ void pvr2_cx25840_subdev_update(struct pvr2_hdw *hdw, 
struct v4l2_subdev *sd)
(hdw->input_val < 0) ||
(hdw->input_val >= sp->cnt)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
-  "*** WARNING *** subdev cx2584x set_input:"
-  " Invalid routing scheme (%u)"
-  " and/or input (%d)",
+  "*** WARNING *** subdev cx2584x set_input: 
Invalid routing scheme (%u) and/or input (%d)",
   sid, hdw->input_val);
return;
}
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c 
b/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c
index e4022bcb155b..58ec706ebdb3 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c
@@ -176,9 +176,7 @@ int pvr2_debugifc_print_status(struct pvr2_hdw *hdw,
pvr2_stream_get_stats(sp, &stats, 0);
ccnt = scnprintf(
buf,acnt,
-   "Bytes streamed=%u"
-   " URBs: queued=%u idle=%u ready=%u"
-   " processed=%u failed=%u\n",
+   "Bytes streamed=%u URBs: queued=%u idle=%u ready=%u 
processed=%u failed=%u\n",
stats.bytes_processed,
stats.buffers_in_queue,
stats.buffers_in_idle,
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-eeprom.c 
b/drivers/media/usb/pvrusb2/pvrusb2-eeprom.c
index e1907cd0c3b7..14ef4ae907c4 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-eeprom.c
+

[PATCH 47/57] [media] ttusb-dec: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/ttusb-dec/ttusb_dec.c | 18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c 
b/drivers/media/usb/ttusb-dec/ttusb_dec.c
index 35d5003ff809..6d1b84be105a 100644
--- a/drivers/media/usb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c
@@ -708,8 +708,7 @@ static void ttusb_dec_process_urb_frame(struct ttusb_dec 
*dec, u8 *b,
dec->packet_payload_length = 2;
dec->packet_state = 7;
} else {
-   printk("%s: unknown packet type: "
-  "%02x%02x\n", __func__,
+   printk("%s: unknown packet type: 
%02x%02x\n", __func__,
   dec->packet[0], dec->packet[1]);
dec->packet_state = 0;
}
@@ -961,8 +960,7 @@ static int ttusb_dec_start_iso_xfer(struct ttusb_dec *dec)
for (i = 0; i < ISO_BUF_COUNT; i++) {
if ((result = usb_submit_urb(dec->iso_urb[i],
 GFP_ATOMIC))) {
-   printk("%s: failed urb submission %d: "
-  "error %d\n", __func__, i, result);
+   printk("%s: failed urb submission %d: error 
%d\n", __func__, i, result);
 
while (i) {
usb_kill_urb(dec->iso_urb[i - 1]);
@@ -1375,8 +1373,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
memcpy(&tmp, &firmware[56], 4);
crc32_check = ntohl(tmp);
if (crc32_csum != crc32_check) {
-   printk("%s: crc32 check of DSP code failed (calculated "
-  "0x%08x != 0x%08x in file), file invalid.\n",
+   printk("%s: crc32 check of DSP code failed (calculated 0x%08x 
!= 0x%08x in file), file invalid.\n",
__func__, crc32_csum, crc32_check);
release_firmware(fw_entry);
return -ENOENT;
@@ -1453,11 +1450,9 @@ static int ttusb_dec_init_stb(struct ttusb_dec *dec)
 
if (!mode) {
if (version == 0xABCDEFAB)
-   printk(KERN_INFO "ttusb_dec: no version "
-  "info in Firmware\n");
+   printk(KERN_INFO "ttusb_dec: no version info in 
Firmware\n");
else
-   printk(KERN_INFO "ttusb_dec: Firmware "
-  "%x.%02x%c%c\n",
+   printk(KERN_INFO "ttusb_dec: Firmware %x.%02x%c%c\n",
   version >> 24, (version >> 16) & 0xff,
   (version >> 8) & 0xff, version & 0xff);
 
@@ -1481,8 +1476,7 @@ static int ttusb_dec_init_stb(struct ttusb_dec *dec)
ttusb_dec_set_model(dec, TTUSB_DEC2540T);
break;
default:
-   printk(KERN_ERR "%s: unknown model returned "
-  "by firmware (%08x) - please report\n",
+   printk(KERN_ERR "%s: unknown model returned by firmware 
(%08x) - please report\n",
   __func__, model);
return -ENOENT;
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 55/57] [media] radio: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/radio-gemtek.c | 8 ++--
 drivers/media/radio/radio-wl1273.c | 3 +--
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/media/radio/radio-gemtek.c 
b/drivers/media/radio/radio-gemtek.c
index cff1eb144a5c..ca051ccbc3e4 100644
--- a/drivers/media/radio/radio-gemtek.c
+++ b/drivers/media/radio/radio-gemtek.c
@@ -67,14 +67,10 @@ module_param(probe, bool, 0444);
 MODULE_PARM_DESC(probe, "Enable automatic device probing.");
 
 module_param(hardmute, bool, 0644);
-MODULE_PARM_DESC(hardmute, "Enable 'hard muting' by shutting down PLL, may "
-"reduce static noise.");
+MODULE_PARM_DESC(hardmute, "Enable 'hard muting' by shutting down PLL, may 
reduce static noise.");
 
 module_param_array(io, int, NULL, 0444);
-MODULE_PARM_DESC(io, "Force I/O ports for the GemTek Radio card if automatic "
-"probing is disabled or fails. The most common I/O ports are: 0x20c "
-"0x30c, 0x24c or 0x34c (0x20c, 0x248 and 0x28c have been reported to "
-"work for the combined sound/radiocard).");
+MODULE_PARM_DESC(io, "Force I/O ports for the GemTek Radio card if automatic 
probing is disabled or fails. The most common I/O ports are: 0x20c 0x30c, 0x24c 
or 0x34c (0x20c, 0x248 and 0x28c have been reported to work for the combined 
sound/radiocard).");
 
 module_param_array(radio_nr, int, NULL, 0444);
 MODULE_PARM_DESC(radio_nr, "Radio device numbers");
diff --git a/drivers/media/radio/radio-wl1273.c 
b/drivers/media/radio/radio-wl1273.c
index a93f681aa9d6..9ce4b12299b4 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -2068,8 +2068,7 @@ static int wl1273_fm_radio_probe(struct platform_device 
*pdev)
goto err_request_irq;
}
} else {
-   dev_err(radio->dev, WL1273_FM_DRIVER_NAME ": Core WL1273 IRQ"
-   " not configured");
+   dev_err(radio->dev, WL1273_FM_DRIVER_NAME ": Core WL1273 IRQ 
not configured");
r = -EINVAL;
goto pdata_err;
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 46/57] [media] ttusb-budget: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c 
b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
index d52d4a8d39ad..361e40b56045 100644
--- a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
@@ -767,8 +767,7 @@ static void ttusb_iso_irq(struct urb *urb)
for (i = 0; i < urb->number_of_packets; ++i) {
numpkt++;
if (time_after_eq(jiffies, lastj + HZ)) {
-   dprintk("frames/s: %lu (ts: %d, stuff %d, "
-   "sec: %d, invalid: %d, all: %d)\n",
+   dprintk("frames/s: %lu (ts: %d, stuff %d, sec: 
%d, invalid: %d, all: %d)\n",
numpkt * HZ / (jiffies - lastj),
numts, numstuff, numsec, numinvalid,
numts + numstuff + numsec + numinvalid);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 35/57] [media] cpia2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/cpia2/cpia2_usb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/usb/cpia2/cpia2_usb.c 
b/drivers/media/usb/cpia2/cpia2_usb.c
index 13620cdf0599..2e03f244c59f 100644
--- a/drivers/media/usb/cpia2/cpia2_usb.c
+++ b/drivers/media/usb/cpia2/cpia2_usb.c
@@ -733,9 +733,7 @@ int cpia2_usb_stream_start(struct camera_data *cam, 
unsigned int alternate)
cam->params.camera_state.stream_mode = old_alt;
ret2 = set_alternate(cam, USBIF_CMDONLY);
if (ret2 < 0) {
-   ERR("cpia2_usb_change_streaming_alternate(%d) =%d has 
already "
-   "failed. Then tried to call "
-   "set_alternate(USBIF_CMDONLY) = %d.\n",
+   ERR("cpia2_usb_change_streaming_alternate(%d) =%d has 
already failed. Then tried to call set_alternate(USBIF_CMDONLY) = %d.\n",
alternate, ret, ret2);
}
} else {
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 52/57] [media] common: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/common/tveeprom.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/common/tveeprom.c b/drivers/media/common/tveeprom.c
index 47da0378cad8..e0e2cb706087 100644
--- a/drivers/media/common/tveeprom.c
+++ b/drivers/media/common/tveeprom.c
@@ -510,8 +510,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct 
tveeprom *tvee,
len = eeprom_data[i] & 0x07;
++i;
} else {
-   tveeprom_warn("Encountered bad packet header [%02x]. "
-   "Corrupt or not a Hauppauge eeprom.\n",
+   tveeprom_warn("Encountered bad packet header [%02x]. 
Corrupt or not a Hauppauge eeprom.\n",
eeprom_data[i]);
return;
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 36/57] [media] cx231xx: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/cx231xx/cx231xx-core.c | 9 +++--
 drivers/media/usb/cx231xx/cx231xx-dvb.c  | 3 +--
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c 
b/drivers/media/usb/cx231xx/cx231xx-core.c
index 8b099fe1d592..6bab66d3377e 100644
--- a/drivers/media/usb/cx231xx/cx231xx-core.c
+++ b/drivers/media/usb/cx231xx/cx231xx-core.c
@@ -241,8 +241,7 @@ static int __usb_control_msg(struct cx231xx *dev, unsigned 
int pipe,
int rc, i;
 
if (reg_debug) {
-   printk(KERN_DEBUG "%s: (pipe 0x%08x): "
-   "%s:  %02x %02x %02x %02x %02x %02x %02x %02x ",
+   printk(KERN_DEBUG "%s: (pipe 0x%08x): %s:  %02x %02x %02x %02x 
%02x %02x %02x %02x ",
dev->name,
pipe,
(requesttype & USB_DIR_IN) ? "IN" : "OUT",
@@ -441,8 +440,7 @@ int cx231xx_write_ctrl_reg(struct cx231xx *dev, u8 req, u16 
reg, char *buf,
if (reg_debug) {
int byte;
 
-   cx231xx_isocdbg("(pipe 0x%08x): "
-   "OUT: %02x %02x %02x %02x %02x %02x %02x %02x >>>",
+   cx231xx_isocdbg("(pipe 0x%08x): OUT: %02x %02x %02x %02x %02x 
%02x %02x %02x >>>",
pipe,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
req, 0, val, reg & 0xff,
@@ -600,8 +598,7 @@ int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, 
u8 alt)
return -1;
}
 
-   cx231xx_coredbg("setting alternate %d with wMaxPacketSize=%u,"
-   "Interface = %d\n", alt, max_pkt_size,
+   cx231xx_coredbg("setting alternate %d with wMaxPacketSize=%u,Interface 
= %d\n", alt, max_pkt_size,
usb_interface_index);
 
if (usb_interface_index > 0) {
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c 
b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index 1417515d30eb..653ff20b484d 100644
--- a/drivers/media/usb/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c
@@ -377,8 +377,7 @@ static int attach_xc5000(u8 addr, struct cx231xx *dev)
cfg.i2c_addr = addr;
 
if (!dev->dvb->frontend) {
-   dev_err(dev->dev, "%s/2: dvb frontend not attached. "
-  "Can't attach xc5000\n", dev->name);
+   dev_err(dev->dev, "%s/2: dvb frontend not attached. Can't 
attach xc5000\n", dev->name);
return -EINVAL;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 40/57] [media] hdpvr: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/hdpvr/hdpvr-core.c  | 9 +++--
 drivers/media/usb/hdpvr/hdpvr-i2c.c   | 6 ++
 drivers/media/usb/hdpvr/hdpvr-video.c | 4 +---
 3 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c 
b/drivers/media/usb/hdpvr/hdpvr-core.c
index a61d8fd63c12..15f016ad5b89 100644
--- a/drivers/media/usb/hdpvr/hdpvr-core.c
+++ b/drivers/media/usb/hdpvr/hdpvr-core.c
@@ -41,13 +41,11 @@ MODULE_PARM_DESC(hdpvr_debug, "enable debugging output");
 
 static uint default_video_input = HDPVR_VIDEO_INPUTS;
 module_param(default_video_input, uint, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(default_video_input, "default video input: 0=Component / "
-"1=S-Video / 2=Composite");
+MODULE_PARM_DESC(default_video_input, "default video input: 0=Component / 
1=S-Video / 2=Composite");
 
 static uint default_audio_input = HDPVR_AUDIO_INPUTS;
 module_param(default_audio_input, uint, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(default_audio_input, "default audio input: 0=RCA back / "
-"1=RCA front / 2=S/PDIF");
+MODULE_PARM_DESC(default_audio_input, "default audio input: 0=RCA back / 1=RCA 
front / 2=S/PDIF");
 
 static bool boost_audio;
 module_param(boost_audio, bool, S_IRUGO|S_IWUSR);
@@ -165,8 +163,7 @@ static int device_authorization(struct hdpvr_device *dev)
dev->flags |= HDPVR_FLAG_AC3_CAP;
break;
default:
-   v4l2_info(&dev->v4l2_dev, "untested firmware, the driver might"
- " not work.\n");
+   v4l2_info(&dev->v4l2_dev, "untested firmware, the driver might 
not work.\n");
if (dev->fw_ver >= HDPVR_FIRMWARE_VERSION_AC3)
dev->flags |= HDPVR_FLAG_AC3_CAP;
else
diff --git a/drivers/media/usb/hdpvr/hdpvr-i2c.c 
b/drivers/media/usb/hdpvr/hdpvr-i2c.c
index 9b641c4d4431..db750e7da323 100644
--- a/drivers/media/usb/hdpvr/hdpvr-i2c.c
+++ b/drivers/media/usb/hdpvr/hdpvr-i2c.c
@@ -145,15 +145,13 @@ static int hdpvr_transfer(struct i2c_adapter 
*i2c_adapter, struct i2c_msg *msgs,
 msgs[0].len);
} else if (num == 2) {
if (msgs[0].addr != msgs[1].addr) {
-   v4l2_warn(&dev->v4l2_dev, "refusing 2-phase i2c xfer "
- "with conflicting target addresses\n");
+   v4l2_warn(&dev->v4l2_dev, "refusing 2-phase i2c xfer 
with conflicting target addresses\n");
retval = -EINVAL;
goto out;
}
 
if ((msgs[0].flags & I2C_M_RD) || !(msgs[1].flags & I2C_M_RD)) {
-   v4l2_warn(&dev->v4l2_dev, "refusing complex xfer with "
- "r0=%d, r1=%d\n", msgs[0].flags & I2C_M_RD,
+   v4l2_warn(&dev->v4l2_dev, "refusing complex xfer with 
r0=%d, r1=%d\n", msgs[0].flags & I2C_M_RD,
  msgs[1].flags & I2C_M_RD);
retval = -EINVAL;
goto out;
diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c 
b/drivers/media/usb/hdpvr/hdpvr-video.c
index 6d43d75493ea..a247063c5816 100644
--- a/drivers/media/usb/hdpvr/hdpvr-video.c
+++ b/drivers/media/usb/hdpvr/hdpvr-video.c
@@ -337,9 +337,7 @@ static int hdpvr_stop_streaming(struct hdpvr_device *dev)
 
buf = kmalloc(dev->bulk_in_size, GFP_KERNEL);
if (!buf)
-   v4l2_err(&dev->v4l2_dev, "failed to allocate temporary buffer "
-"for emptying the internal device buffer. "
-"Next capture start will be slow\n");
+   v4l2_err(&dev->v4l2_dev, "failed to allocate temporary buffer 
for emptying the internal device buffer. Next capture start will be slow\n");
 
dev->status = STATUS_SHUTTING_DOWN;
hdpvr_config_call(dev, CTRL_STOP_STREAMING_VALUE, 0x00);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 07/57] [media] b2c2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/b2c2/flexcop-dma.c | 6 ++
 drivers/media/pci/b2c2/flexcop-pci.c | 6 ++
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/media/pci/b2c2/flexcop-dma.c 
b/drivers/media/pci/b2c2/flexcop-dma.c
index 2881e0d956ad..913dc97f8b49 100644
--- a/drivers/media/pci/b2c2/flexcop-dma.c
+++ b/drivers/media/pci/b2c2/flexcop-dma.c
@@ -57,8 +57,7 @@ int flexcop_dma_config(struct flexcop_device *fc,
fc->write_ibi_reg(fc,dma2_014,v0x4);
fc->write_ibi_reg(fc,dma2_01c,v0xc);
} else {
-   err("either DMA1 or DMA2 can be configured within one "
-   "flexcop_dma_config call.");
+   err("either DMA1 or DMA2 can be configured within one 
flexcop_dma_config call.");
return -EINVAL;
}
 
@@ -82,8 +81,7 @@ int flexcop_dma_xfer_control(struct flexcop_device *fc,
r0x0 = dma2_010;
r0xc = dma2_01c;
} else {
-   err("either transfer DMA1 or DMA2 can be started within one "
-   "flexcop_dma_xfer_control call.");
+   err("either transfer DMA1 or DMA2 can be started within one 
flexcop_dma_xfer_control call.");
return -EINVAL;
}
 
diff --git a/drivers/media/pci/b2c2/flexcop-pci.c 
b/drivers/media/pci/b2c2/flexcop-pci.c
index 4cac1fc233f2..f0d127e640bb 100644
--- a/drivers/media/pci/b2c2/flexcop-pci.c
+++ b/drivers/media/pci/b2c2/flexcop-pci.c
@@ -185,8 +185,7 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
fc->read_ibi_reg(fc,dma1_008).dma_0x8.dma_cur_addr << 2;
u32 cur_pos = cur_addr - fc_pci->dma[0].dma_addr0;
 
-   deb_irq("%u irq: %08x cur_addr: %llx: cur_pos: %08x, "
-   "last_cur_pos: %08x ",
+   deb_irq("%u irq: %08x cur_addr: %llx: cur_pos: %08x, 
last_cur_pos: %08x ",
jiffies_to_usecs(jiffies - fc_pci->last_irq),
v.raw, (unsigned long long)cur_addr, cur_pos,
fc_pci->last_dma1_cur_pos);
@@ -220,8 +219,7 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
fc_pci->last_dma1_cur_pos = cur_pos;
fc_pci->count++;
} else {
-   deb_irq("isr for flexcop called, "
-   "apparently without reason (%08x)\n", v.raw);
+   deb_irq("isr for flexcop called, apparently without reason 
(%08x)\n", v.raw);
ret = IRQ_NONE;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 11/57] [media] cx88: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/cx88/cx88-alsa.c| 13 -
 drivers/media/pci/cx88/cx88-cards.c   | 12 
 drivers/media/pci/cx88/cx88-dsp.c |  9 +++--
 drivers/media/pci/cx88/cx88-dvb.c |  6 ++
 drivers/media/pci/cx88/cx88-i2c.c |  3 +--
 drivers/media/pci/cx88/cx88-mpeg.c| 12 
 drivers/media/pci/cx88/cx88-tvaudio.c |  6 ++
 drivers/media/pci/cx88/cx88-video.c   |  3 +--
 8 files changed, 21 insertions(+), 43 deletions(-)

diff --git a/drivers/media/pci/cx88/cx88-alsa.c 
b/drivers/media/pci/cx88/cx88-alsa.c
index 723f06462104..099f14173cb4 100644
--- a/drivers/media/pci/cx88/cx88-alsa.c
+++ b/drivers/media/pci/cx88/cx88-alsa.c
@@ -120,9 +120,7 @@ MODULE_AUTHOR("Mauro Carvalho Chehab 
");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(CX88_VERSION);
 
-MODULE_SUPPORTED_DEVICE("{{Conexant,23881},"
-   "{{Conexant,23882},"
-   "{{Conexant,23883}");
+MODULE_SUPPORTED_DEVICE("{{Conexant,23881},{{Conexant,23882},{{Conexant,23883}");
 static unsigned int debug;
 module_param(debug,int,0644);
 MODULE_PARM_DESC(debug,"enable debug messages");
@@ -154,8 +152,7 @@ static int _cx88_start_audio_dma(snd_cx88_card_t *chip)
cx_write(MO_AUDD_GPCNTRL, GP_COUNT_CONTROL_RESET);
atomic_set(&chip->count, 0);
 
-   dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d "
-   "byte buffer\n", buf->bpl, cx_read(audio_ch->cmds_start + 8)>>1,
+   dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d 
byte buffer\n", buf->bpl, cx_read(audio_ch->cmds_start + 8)>>1,
chip->num_periods, buf->bpl * chip->num_periods);
 
/* Enables corresponding bits at AUD_INT_STAT */
@@ -425,8 +422,7 @@ static int snd_cx88_pcm_open(struct snd_pcm_substream 
*substream)
int err;
 
if (!chip) {
-   printk(KERN_ERR "BUG: cx88 can't find device struct."
-   " Can't proceed with open\n");
+   printk(KERN_ERR "BUG: cx88 can't find device struct. Can't 
proceed with open\n");
return -ENODEV;
}
 
@@ -914,8 +910,7 @@ static int snd_cx88_create(struct snd_card *card, struct 
pci_dev *pci,
/* print pci info */
pci_read_config_byte(pci, PCI_LATENCY_TIMER, &pci_lat);
 
-   dprintk(1,"ALSA %s/%i: found at %s, rev: %d, irq: %d, "
-  "latency: %d, mmio: 0x%llx\n", core->name, devno,
+   dprintk(1,"ALSA %s/%i: found at %s, rev: %d, irq: %d, latency: %d, 
mmio: 0x%llx\n", core->name, devno,
   pci_name(pci), pci->revision, pci->irq,
   pci_lat, (unsigned long long)pci_resource_start(pci,0));
 
diff --git a/drivers/media/pci/cx88/cx88-cards.c 
b/drivers/media/pci/cx88/cx88-cards.c
index 8f2556ec3971..286d6e2aa590 100644
--- a/drivers/media/pci/cx88/cx88-cards.c
+++ b/drivers/media/pci/cx88/cx88-cards.c
@@ -2847,8 +2847,7 @@ static void leadtek_eeprom(struct cx88_core *core, u8 
*eeprom_data)
break;
}
 
-   info_printk(core, "Leadtek Winfast 2000XP Expert config: "
-   "tuner=%d, eeprom[0]=0x%02x\n",
+   info_printk(core, "Leadtek Winfast 2000XP Expert config: tuner=%d, 
eeprom[0]=0x%02x\n",
core->board.tuner_type, eeprom_data[0]);
 }
 
@@ -3107,8 +3106,7 @@ static void dvico_fusionhdtv_hybrid_init(struct cx88_core 
*core)
msg.len = (i != 12 ? 5 : 2);
err = i2c_transfer(&core->i2c_adap, &msg, 1);
if (err != 1) {
-   warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
- "failed (err = %d)!\n", i, err);
+   warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d 
failed (err = %d)!\n", i, err);
return;
}
}
@@ -3284,8 +3282,7 @@ static void cx88_card_list(struct cx88_core *core, struct 
pci_dev *pci)
   "%s: version might help as well.\n",
   core->name,core->name,core->name,core->name);
}
-   err_printk(core, "Here is a list of valid choices for the card= "
-  "insmod option:\n");
+   err_printk(core, "Here is a list of valid choices for the card= 
insmod option:\n");
for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
printk(KERN_ERR "%s:card=%d -> %s\n",
   core->name, i, cx88_boards[i].name);
@@ -3510,8 +3507,7 @@ static void cx88_card_setup(struct cx88_core *core)
for (i = 0; i < ARRAY_SIZE(buffer); i++)
if (2 != i2c_master_send(&core->i2c_client,
  

[PATCH 31/57] [media] si4713: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/si4713/si4713.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/media/radio/si4713/si4713.c 
b/drivers/media/radio/si4713/si4713.c
index 0b04b56571da..797d35e4d0d2 100644
--- a/drivers/media/radio/si4713/si4713.c
+++ b/drivers/media/radio/si4713/si4713.c
@@ -716,8 +716,7 @@ static int si4713_tx_tune_status(struct si4713_device 
*sdev, u8 intack,
*power = val[5];
*antcap = val[6];
*noise = val[7];
-   v4l2_dbg(1, debug, &sdev->sd, "%s: response: %d x 10 kHz "
-   "(power %d, antcap %d, rnl %d)\n", __func__,
+   v4l2_dbg(1, debug, &sdev->sd, "%s: response: %d x 10 kHz (power 
%d, antcap %d, rnl %d)\n", __func__,
*frequency, *power, *antcap, *noise);
}
 
@@ -758,9 +757,7 @@ static int si4713_tx_rds_buff(struct si4713_device *sdev, 
u8 mode, u16 rdsb,
v4l2_dbg(1, debug, &sdev->sd,
"%s: status=0x%02x\n", __func__, val[0]);
*cbleft = (s8)val[2] - val[3];
-   v4l2_dbg(1, debug, &sdev->sd, "%s: response: interrupts"
-   " 0x%02x cb avail: %d cb used %d fifo avail"
-   " %d fifo used %d\n", __func__, val[1],
+   v4l2_dbg(1, debug, &sdev->sd, "%s: response: interrupts 0x%02x 
cb avail: %d cb used %d fifo avail %d fifo used %d\n", __func__, val[1],
val[2], val[3], val[4], val[5]);
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 38/57] [media] dvb-usb-v2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 10 +++---
 drivers/media/usb/dvb-usb-v2/mxl111sf.c |  9 +++--
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c 
b/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c
index 283495c84ba3..ea39056412c5 100644
--- a/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c
+++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c
@@ -666,8 +666,7 @@ static int mxl111sf_i2c_hw_xfer_msg(struct mxl111sf_state 
*state,
 
if (rd_status[i] == 0x04) {
if (i < 7) {
-   mxl_i2c("i2c fifo empty!"
-   " @ %d", i);
+   mxl_i2c("i2c fifo empty! @ %d", 
i);
msg->buf[(index*8)+i] =
i2c_r_data[(i*3)+1];
/* read again */
@@ -692,8 +691,7 @@ static int mxl111sf_i2c_hw_xfer_msg(struct mxl111sf_state 
*state,
}
goto stop_copy;
} else {
-   mxl_i2c("readagain "
-   "ERROR!");
+   mxl_i2c("readagain 
ERROR!");
}
} else {
msg->buf[(index*8)+i] =
@@ -827,9 +825,7 @@ int mxl111sf_i2c_xfer(struct i2c_adapter *adap,
mxl111sf_i2c_hw_xfer_msg(state, &msg[i]) :
mxl111sf_i2c_sw_xfer_msg(state, &msg[i]);
if (mxl_fail(ret)) {
-   mxl_debug_adv("failed with error %d on i2c "
- "transaction %d of %d, %sing %d bytes "
- "to/from 0x%02x", ret, i+1, num,
+   mxl_debug_adv("failed with error %d on i2c transaction 
%d of %d, %sing %d bytes to/from 0x%02x", ret, i+1, num,
  (msg[i].flags & I2C_M_RD) ?
  "read" : "writ",
  msg[i].len, msg[i].addr);
diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c 
b/drivers/media/usb/dvb-usb-v2/mxl111sf.c
index 5d676b533a3a..58da619b7c59 100644
--- a/drivers/media/usb/dvb-usb-v2/mxl111sf.c
+++ b/drivers/media/usb/dvb-usb-v2/mxl111sf.c
@@ -29,8 +29,7 @@
 
 int dvb_usb_mxl111sf_debug;
 module_param_named(debug, dvb_usb_mxl111sf_debug, int, 0644);
-MODULE_PARM_DESC(debug, "set debugging level "
-"(1=info, 2=xfer, 4=i2c, 8=reg, 16=adv (or-able)).");
+MODULE_PARM_DESC(debug, "set debugging level (1=info, 2=xfer, 4=i2c, 8=reg, 
16=adv (or-able)).");
 
 static int dvb_usb_mxl111sf_isoc;
 module_param_named(isoc, dvb_usb_mxl111sf_isoc, int, 0644);
@@ -137,8 +136,7 @@ int mxl111sf_write_reg_mask(struct mxl111sf_state *state,
 #if 1
/* dont know why this usually errors out on the first try */
if (mxl_fail(ret))
-   pr_err("error writing addr: 0x%02x, mask: 0x%02x, "
-   "data: 0x%02x, retrying...", addr, mask, data);
+   pr_err("error writing addr: 0x%02x, mask: 0x%02x, data: 
0x%02x, retrying...", addr, mask, data);
 
ret = mxl111sf_read_reg(state, addr, &val);
 #endif
@@ -946,8 +944,7 @@ static int mxl111sf_init(struct dvb_usb_device *d)
case 138001:
break;
default:
-   printk(KERN_WARNING "%s: warning: "
-  "unknown hauppauge model #%d\n",
+   printk(KERN_WARNING "%s: warning: unknown hauppauge model 
#%d\n",
   __func__, state->tv.model);
}
 #endif
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 39/57] [media] em28xx: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/em28xx/em28xx-cards.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-cards.c 
b/drivers/media/usb/em28xx/em28xx-cards.c
index bcd6ac61d9f8..fd11084de447 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -1561,8 +1561,7 @@ struct em28xx_board em28xx_boards[] = {
} },
},
[EM2820_BOARD_PINNACLE_DVC_90] = {
-   .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser 
Baas Video to DVD maker "
-  "/ Kworld DVD Maker 2 / Plextor ConvertX 
PX-AV100U",
+   .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser 
Baas Video to DVD maker / Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U",
.tuner_type   = TUNER_ABSENT, /* capture only board */
.decoder  = EM28XX_SAA711X,
.input= { {
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 34/57] [media] b2c2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/b2c2/flexcop-usb.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/b2c2/flexcop-usb.c 
b/drivers/media/usb/b2c2/flexcop-usb.c
index d4bdba60b0f7..f9b07649a862 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -33,8 +33,7 @@
 
 static int debug;
 module_param(debug, int, 0644);
-MODULE_PARM_DESC(debug, "set debugging level (1=info,ts=2,"
-   "ctrl=4,i2c=8,v8mem=16 (or-able))." DEBSTATUS);
+MODULE_PARM_DESC(debug, "set debugging level 
(1=info,ts=2,ctrl=4,i2c=8,v8mem=16 (or-able))." DEBSTATUS);
 #undef DEBSTATUS
 
 #define deb_info(args...) dprintk(0x01, args)
@@ -403,8 +402,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb 
*fc_usb)
frame_size, i, j, ret;
int buffer_offset = 0;
 
-   deb_ts("creating %d iso-urbs with %d frames "
-   "each of %d bytes size = %d.\n", B2C2_USB_NUM_ISO_URB,
+   deb_ts("creating %d iso-urbs with %d frames each of %d bytes size = 
%d.\n", B2C2_USB_NUM_ISO_URB,
B2C2_USB_FRAMES_PER_ISO, frame_size, bufsize);
 
fc_usb->iso_buffer = usb_alloc_coherent(fc_usb->udev,
@@ -429,8 +427,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb 
*fc_usb)
for (i = 0; i < B2C2_USB_NUM_ISO_URB; i++) {
int frame_offset = 0;
struct urb *urb = fc_usb->iso_urb[i];
-   deb_ts("initializing and submitting urb no. %d "
-   "(buf_offset: %d).\n", i, buffer_offset);
+   deb_ts("initializing and submitting urb no. %d (buf_offset: 
%d).\n", i, buffer_offset);
 
urb->dev = fc_usb->udev;
urb->context = fc_usb;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 02/57] [media] dvb-frontends: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/dvb-frontends/au8522_common.c |  4 ++--
 drivers/media/dvb-frontends/cx24110.c   |  4 ++--
 drivers/media/dvb-frontends/cx24113.c   |  4 ++--
 drivers/media/dvb-frontends/cx24116.c   | 10 +-
 drivers/media/dvb-frontends/cx24117.c   |  4 ++--
 drivers/media/dvb-frontends/cx24123.c   |  4 ++--
 drivers/media/dvb-frontends/ds3000.c| 15 +++
 drivers/media/dvb-frontends/lgdt330x.c  |  3 +--
 drivers/media/dvb-frontends/m88rs2000.c | 11 +--
 drivers/media/dvb-frontends/mt312.c |  7 +++
 drivers/media/dvb-frontends/nxt200x.c   | 11 +--
 drivers/media/dvb-frontends/or51132.c   |  6 ++
 drivers/media/dvb-frontends/or51211.c   |  3 +--
 drivers/media/dvb-frontends/s5h1409.c   |  4 ++--
 drivers/media/dvb-frontends/s5h1411.c   |  4 ++--
 drivers/media/dvb-frontends/s5h1432.c   |  4 ++--
 drivers/media/dvb-frontends/s921.c  |  4 ++--
 drivers/media/dvb-frontends/si21xx.c|  8 
 drivers/media/dvb-frontends/sp887x.c|  3 +--
 drivers/media/dvb-frontends/stv0288.c   | 11 +--
 drivers/media/dvb-frontends/stv0297.c   |  4 ++--
 drivers/media/dvb-frontends/stv0299.c   |  7 +++
 drivers/media/dvb-frontends/stv0900_sw.c|  3 +--
 drivers/media/dvb-frontends/tda10021.c  |  3 +--
 drivers/media/dvb-frontends/tda10023.c  |  6 ++
 drivers/media/dvb-frontends/tda10048.c  | 12 
 drivers/media/dvb-frontends/ves1820.c   |  8 
 drivers/media/dvb-frontends/zl10036.c   |  4 ++--
 drivers/media/dvb-frontends/zl10039.c   |  3 +--
 29 files changed, 77 insertions(+), 97 deletions(-)

diff --git a/drivers/media/dvb-frontends/au8522_common.c 
b/drivers/media/dvb-frontends/au8522_common.c
index f135126bc373..cf4ac240a01f 100644
--- a/drivers/media/dvb-frontends/au8522_common.c
+++ b/drivers/media/dvb-frontends/au8522_common.c
@@ -50,8 +50,8 @@ int au8522_writereg(struct au8522_state *state, u16 reg, u8 
data)
ret = i2c_transfer(state->i2c, &msg, 1);
 
if (ret != 1)
-   printk("%s: writereg error (reg == 0x%02x, val == 0x%04x, "
-  "ret == %i)\n", __func__, reg, data, ret);
+   printk("%s: writereg error (reg == 0x%02x, val == 0x%04x, ret 
== %i)\n",
+  __func__, reg, data, ret);
 
return (ret != 1) ? -1 : 0;
 }
diff --git a/drivers/media/dvb-frontends/cx24110.c 
b/drivers/media/dvb-frontends/cx24110.c
index 6cb81ec12847..92a08c7bf794 100644
--- a/drivers/media/dvb-frontends/cx24110.c
+++ b/drivers/media/dvb-frontends/cx24110.c
@@ -120,8 +120,8 @@ static int cx24110_writereg (struct cx24110_state* state, 
int reg, int data)
int err;
 
if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
-   dprintk ("%s: writereg error (err == %i, reg == 0x%02x,"
-" data == 0x%02x)\n", __func__, err, reg, data);
+   dprintk("%s: writereg error (err == %i, reg == 0x%02x, data == 
0x%02x)\n",
+   __func__, err, reg, data);
return -EREMOTEIO;
}
 
diff --git a/drivers/media/dvb-frontends/cx24113.c 
b/drivers/media/dvb-frontends/cx24113.c
index 3883c3b31aef..3812ef8cac08 100644
--- a/drivers/media/dvb-frontends/cx24113.c
+++ b/drivers/media/dvb-frontends/cx24113.c
@@ -108,8 +108,8 @@ static int cx24113_writereg(struct cx24113_state *state, 
int reg, int data)
.flags = 0, .buf = buf, .len = 2 };
int err = i2c_transfer(state->i2c, &msg, 1);
if (err != 1) {
-   printk(KERN_DEBUG "%s: writereg error(err == %i, reg == 0x%02x,"
-" data == 0x%02x)\n", __func__, err, reg, data);
+   printk(KERN_DEBUG "%s: writereg error(err == %i, reg == 0x%02x, 
data == 0x%02x)\n",
+  __func__, err, reg, data);
return err;
}
 
diff --git a/drivers/media/dvb-frontends/cx24116.c 
b/drivers/media/dvb-frontends/cx24116.c
index 8814f36d53fb..b652963df103 100644
--- a/drivers/media/dvb-frontends/cx24116.c
+++ b/drivers/media/dvb-frontends/cx24116.c
@@ -209,8 +209,8 @@ static int cx24116_writereg(struct cx24116_state *state, 
int reg, int data)
 
err = i2c_transfer(state->i2c, &msg, 1);
if (err != 1) {
-   printk(KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x,"
-" value == 0x%02x)\n", __func__, err, reg, data);
+   printk(KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x, 
value == 0x%02x)\n",
+  __func__, err, reg, data);
return -EREMOTEIO;
}
 
@@ -498,8 +498,8 @@ st

[PATCH 08/57] [media] bt8xx: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/bt8xx/bttv-cards.c  | 9 +++--
 drivers/media/pci/bt8xx/bttv-driver.c | 6 ++
 drivers/media/pci/bt8xx/bttv-i2c.c| 6 ++
 drivers/media/pci/bt8xx/bttv-input.c  | 3 +--
 4 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-cards.c 
b/drivers/media/pci/bt8xx/bttv-cards.c
index 8a17cc0bfa07..4ad50f978e0e 100644
--- a/drivers/media/pci/bt8xx/bttv-cards.c
+++ b/drivers/media/pci/bt8xx/bttv-cards.c
@@ -125,10 +125,8 @@ module_param_array(remote,   int, NULL, 0444);
 module_param_array(audiodev, int, NULL, 0444);
 module_param_array(audiomux, int, NULL, 0444);
 
-MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
-"[enable bug compatibility for triton1 + others]");
-MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
-"[yet another chipset flaw workaround]");
+MODULE_PARM_DESC(triton1,"set ETBF pci config bit [enable bug compatibility 
for triton1 + others]");
+MODULE_PARM_DESC(vsfx,"set VSFX pci config bit [yet another chipset flaw 
workaround]");
 MODULE_PARM_DESC(latency,"pci latency timer");
 MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a 
list");
 MODULE_PARM_DESC(pll, "specify installed crystal (0=none, 28=28 MHz, 35=35 
MHz, 14=14 MHz)");
@@ -141,8 +139,7 @@ MODULE_PARM_DESC(audiodev, "specify audio device:\n"
"\t\t 2 = tda7432\n"
"\t\t 3 = tvaudio");
 MODULE_PARM_DESC(saa6588, "if 1, then load the saa6588 RDS module, default (0) 
is to use the card definition.");
-MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 
enables)"
-   " [some VIA/SIS chipsets are known to have problem with 
overlay]");
+MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 
enables) [some VIA/SIS chipsets are known to have problem with overlay]");
 
 /* --- */
 /* list of card IDs for bt878+ cards   */
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c 
b/drivers/media/pci/bt8xx/bttv-driver.c
index 97b91a9f9fa9..fb4aefbcc8f8 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -148,8 +148,7 @@ MODULE_PARM_DESC(irq_debug, "irq handler debug messages, 
default is 0 (no)");
 MODULE_PARM_DESC(disable_ir, "disable infrared remote support");
 MODULE_PARM_DESC(gbuffers, "number of capture buffers. range 2-32, default 8");
 MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 0x208000");
-MODULE_PARM_DESC(reset_crop, "reset cropping parameters at open(), default "
-"is 1 (yes) for compatibility with older applications");
+MODULE_PARM_DESC(reset_crop, "reset cropping parameters at open(), default is 
1 (yes) for compatibility with older applications");
 MODULE_PARM_DESC(automute, "mute audio on bad/missing video signal, default is 
1 (yes)");
 MODULE_PARM_DESC(chroma_agc, "enables the AGC of chroma signal, default is 0 
(no)");
 MODULE_PARM_DESC(agc_crush, "enables the luminance AGC crush, default is 1 
(yes)");
@@ -3506,8 +3505,7 @@ static void bttv_irq_debug_low_latency(struct bttv *btv, 
u32 rc)
(unsigned long)rc);
 
if (0 == (btread(BT848_DSTATUS) & BT848_DSTATUS_HLOC)) {
-   pr_notice("%d: Oh, there (temporarily?) is no input signal. "
- "Ok, then this is harmless, don't worry ;)\n",
+   pr_notice("%d: Oh, there (temporarily?) is no input signal. Ok, 
then this is harmless, don't worry ;)\n",
  btv->c.nr);
return;
}
diff --git a/drivers/media/pci/bt8xx/bttv-i2c.c 
b/drivers/media/pci/bt8xx/bttv-i2c.c
index d43911deb617..830437471038 100644
--- a/drivers/media/pci/bt8xx/bttv-i2c.c
+++ b/drivers/media/pci/bt8xx/bttv-i2c.c
@@ -44,15 +44,13 @@ static int i2c_scan;
 module_param(i2c_debug, int, 0644);
 MODULE_PARM_DESC(i2c_debug, "configure i2c debug level");
 module_param(i2c_hw,int, 0444);
-MODULE_PARM_DESC(i2c_hw,"force use of hardware i2c support, "
-   "instead of software bitbang");
+MODULE_PARM_DESC(i2c_hw,"force use of hardware i2c support, instead of 
software bitbang");
 module_param(i2c_scan,  int, 0444);
 MODULE_PARM_DESC(i2c_scan,"scan i2c bus at insmod time");
 
 static unsigned int i2c_udelay = 5;
 module_param(i2c_udelay, int, 0444);
-MODULE_PARM_DESC(i2c_udelay,"soft i2c delay at insmod time, in usecs "
-   "(should be 5 or higher). Lower value means higher bus speed.");
+MODULE_PARM_DESC(i2c_udelay,"soft i2c delay at insmod time, in usecs (should 
be 5 or higher). Lower value means higher bus speed.");

[PATCH 03/57] [media] firewire: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/firewire/firedtv-avc.c | 5 +++--
 drivers/media/firewire/firedtv-rc.c  | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/media/firewire/firedtv-avc.c 
b/drivers/media/firewire/firedtv-avc.c
index 251a556112a9..e04235ea23fb 100644
--- a/drivers/media/firewire/firedtv-avc.c
+++ b/drivers/media/firewire/firedtv-avc.c
@@ -1181,8 +1181,9 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int 
length)
if (es_info_length > 0) {
pmt_cmd_id = msg[read_pos++];
if (pmt_cmd_id != 1 && pmt_cmd_id != 4)
-   dev_err(fdtv->device, "invalid pmt_cmd_id %d "
-   "at stream level\n", pmt_cmd_id);
+   dev_err(fdtv->device,
+   "invalid pmt_cmd_id %d at stream 
level\n",
+   pmt_cmd_id);
 
if (es_info_length > sizeof(c->operand) - 4 -
 write_pos) {
diff --git a/drivers/media/firewire/firedtv-rc.c 
b/drivers/media/firewire/firedtv-rc.c
index f82d4a93feb3..babfb9cee20e 100644
--- a/drivers/media/firewire/firedtv-rc.c
+++ b/drivers/media/firewire/firedtv-rc.c
@@ -184,8 +184,9 @@ void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code)
else if (code >= 0x4540 && code <= 0x4542)
code = oldtable[code - 0x4521];
else {
-   printk(KERN_DEBUG "firedtv: invalid key code 0x%04x "
-  "from remote control\n", code);
+   printk(KERN_DEBUG
+  "firedtv: invalid key code 0x%04x from remote control\n",
+  code);
return;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 44/57] [media] stkwebcam: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/stkwebcam/stk-sensor.c | 3 +--
 drivers/media/usb/stkwebcam/stk-webcam.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/usb/stkwebcam/stk-sensor.c 
b/drivers/media/usb/stkwebcam/stk-sensor.c
index e546b014d7ad..65334a00e3b3 100644
--- a/drivers/media/usb/stkwebcam/stk-sensor.c
+++ b/drivers/media/usb/stkwebcam/stk-sensor.c
@@ -391,8 +391,7 @@ int stk_sensor_init(struct stk_camera *dev)
}
stk_sensor_write_regvals(dev, ov_initvals);
msleep(10);
-   STK_INFO("OmniVision sensor detected, id %02X%02X"
-   " at address %x\n", idh, idl, SENSOR_ADDRESS);
+   STK_INFO("OmniVision sensor detected, id %02X%02X at address %x\n", 
idh, idl, SENSOR_ADDRESS);
return 0;
 }
 
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c 
b/drivers/media/usb/stkwebcam/stk-webcam.c
index db200c9d796d..267a22f24f82 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -366,8 +366,7 @@ static void stk_isoc_handler(struct urb *urb)
if (fb->v4lbuf.bytesused != 0
&& fb->v4lbuf.bytesused != dev->frame_size) {
(void) (printk_ratelimit() &&
-   STK_ERROR("frame %d, "
-   "bytesused=%d, skipping\n",
+   STK_ERROR("frame %d, bytesused=%d, skipping\n",
i, fb->v4lbuf.bytesused));
fb->v4lbuf.bytesused = 0;
fill = fb->buffer;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 33/57] [media] au0828: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/au0828/au0828-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-video.c 
b/drivers/media/usb/au0828/au0828-video.c
index 85dd9a8e83ff..7a10eaa38f67 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -253,8 +253,7 @@ static int au0828_init_isoc(struct au0828_dev *dev, int 
max_packets,
dev->isoc_ctl.transfer_buffer[i] = 
usb_alloc_coherent(dev->usbdev,
sb_size, GFP_KERNEL, &urb->transfer_dma);
if (!dev->isoc_ctl.transfer_buffer[i]) {
-   printk("unable to allocate %i bytes for transfer"
-   " buffer %i%s\n",
+   printk("unable to allocate %i bytes for transfer buffer 
%i%s\n",
sb_size, i,
in_interrupt() ? " while in int" : "");
au0828_uninit_isoc(dev);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 09/57] [media] cx18: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/cx18/cx18-alsa-main.c   |  6 ++
 drivers/media/pci/cx18/cx18-av-core.c | 14 -
 drivers/media/pci/cx18/cx18-av-firmware.c |  3 +--
 drivers/media/pci/cx18/cx18-controls.c|  9 +++-
 drivers/media/pci/cx18/cx18-driver.c  | 30 +-
 drivers/media/pci/cx18/cx18-dvb.c |  6 ++
 drivers/media/pci/cx18/cx18-fileops.c |  6 ++
 drivers/media/pci/cx18/cx18-ioctl.c   |  6 ++
 drivers/media/pci/cx18/cx18-irq.c |  3 +--
 drivers/media/pci/cx18/cx18-mailbox.c | 35 +--
 drivers/media/pci/cx18/cx18-queue.c   |  7 ++-
 drivers/media/pci/cx18/cx18-streams.c |  6 ++
 12 files changed, 41 insertions(+), 90 deletions(-)

diff --git a/drivers/media/pci/cx18/cx18-alsa-main.c 
b/drivers/media/pci/cx18/cx18-alsa-main.c
index 0b0e8015ad34..51ebe4962805 100644
--- a/drivers/media/pci/cx18/cx18-alsa-main.c
+++ b/drivers/media/pci/cx18/cx18-alsa-main.c
@@ -217,8 +217,7 @@ static int cx18_alsa_load(struct cx18 *cx)
 
s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM];
if (s->video_dev.v4l2_dev == NULL) {
-   CX18_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - "
-"skipping\n", __func__);
+   CX18_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - 
skipping\n", __func__);
return 0;
}
 
@@ -232,8 +231,7 @@ static int cx18_alsa_load(struct cx18 *cx)
CX18_ALSA_ERR("%s: failed to create struct snd_cx18_card\n",
  __func__);
} else {
-   CX18_DEBUG_ALSA_INFO("%s: created cx18 ALSA interface instance "
-"\n", __func__);
+   CX18_DEBUG_ALSA_INFO("%s: created cx18 ALSA interface instance 
\n", __func__);
}
return 0;
 }
diff --git a/drivers/media/pci/cx18/cx18-av-core.c 
b/drivers/media/pci/cx18/cx18-av-core.c
index 30bbe8d1ea55..2761b09ac935 100644
--- a/drivers/media/pci/cx18/cx18-av-core.c
+++ b/drivers/media/pci/cx18/cx18-av-core.c
@@ -468,21 +468,16 @@ void cx18_av_std_setup(struct cx18 *cx)
CX18_DEBUG_INFO_DEV(sd, "Pixel rate = %d.%06d Mpixel/sec\n",
pll / 800, (pll / 8) % 100);
 
-   CX18_DEBUG_INFO_DEV(sd, "ADC XTAL/pixel clock decimation ratio "
-   "= %d.%03d\n", src_decimation / 256,
+   CX18_DEBUG_INFO_DEV(sd, "ADC XTAL/pixel clock decimation ratio 
= %d.%03d\n", src_decimation / 256,
((src_decimation % 256) * 1000) / 256);
 
tmp = 28636360 * (u64) sc;
do_div(tmp, src_decimation);
fsc = tmp >> 13;
CX18_DEBUG_INFO_DEV(sd,
-   "Chroma sub-carrier initial freq = %d.%06d "
-   "MHz\n", fsc / 100, fsc % 100);
+   "Chroma sub-carrier initial freq = %d.%06d 
MHz\n", fsc / 100, fsc % 100);
 
-   CX18_DEBUG_INFO_DEV(sd, "hblank %i, hactive %i, vblank %i, "
-   "vactive %i, vblank656 %i, src_dec %i, "
-   "burst 0x%02x, luma_lpf %i, uv_lpf %i, "
-   "comb 0x%02x, sc 0x%06x\n",
+   CX18_DEBUG_INFO_DEV(sd, "hblank %i, hactive %i, vblank %i, 
vactive %i, vblank656 %i, src_dec %i, burst 0x%02x, luma_lpf %i, uv_lpf %i, 
comb 0x%02x, sc 0x%06x\n",
hblank, hactive, vblank, vactive, vblank656,
src_decimation, burst, luma_lpf, uv_lpf,
comb, sc);
@@ -1069,8 +1064,7 @@ static void log_video_status(struct cx18 *cx)
CX18_INFO_DEV(sd, "Specified video input: Composite %d\n",
  vid_input - CX18_AV_COMPOSITE1 + 1);
} else {
-   CX18_INFO_DEV(sd, "Specified video input: "
- "S-Video (Luma In%d, Chroma In%d)\n",
+   CX18_INFO_DEV(sd, "Specified video input: S-Video (Luma 
In%d, Chroma In%d)\n",
  (vid_input & 0xf0) >> 4,
  (vid_input & 0xf00) >> 8);
}
diff --git a/drivers/media/pci/cx18/cx18-av-firmware.c 
b/drivers/media/pci/cx18/cx18-av-firmware.c
index a34fd082b76e..160e2e53383f 100644
--- a/drivers/media/pci/cx18/cx18-av-firmware.c
+++ b/drivers/media/pci/cx18/cx18-av-firmware.c
@@ -61,8 +61,7 @@ static int cx18_av_verifyfw(struct cx18 *cx, const struct 
firmware *fw)
dl_c

[PATCH 04/57] [media] cx25840: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/cx25840/cx25840-core.c | 11 +++
 drivers/media/i2c/cx25840/cx25840-ir.c   |  6 ++
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/media/i2c/cx25840/cx25840-core.c 
b/drivers/media/i2c/cx25840/cx25840-core.c
index 142ae28803bb..0dcf450052ac 100644
--- a/drivers/media/i2c/cx25840/cx25840-core.c
+++ b/drivers/media/i2c/cx25840/cx25840-core.c
@@ -873,10 +873,7 @@ void cx25840_std_setup(struct i2c_client *client)
"Chroma sub-carrier freq = %d.%06d 
MHz\n",
fsc / 100, fsc % 100);
 
-   v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive 
%i, "
-   "vblank %i, vactive %i, vblank656 %i, src_dec 
%i, "
-   "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 
0x%02x, "
-   "sc 0x%06x\n",
+   v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive 
%i, vblank %i, vactive %i, vblank656 %i, src_dec %i, burst 0x%02x, luma_lpf %i, 
uv_lpf %i, comb 0x%02x, sc 0x%06x\n",
hblank, hactive, vblank, vactive, vblank656,
src_decimation, burst, luma_lpf, uv_lpf, comb, 
sc);
}
@@ -5169,11 +5166,9 @@ static int cx25840_probe(struct i2c_client *client,
id = CX2310X_AV;
} else if ((device_id & 0xff) == (device_id >> 8)) {
v4l_err(client,
-   "likely a confused/unresponsive cx2388[578] A/V decoder"
-   " found @ 0x%x (%s)\n",
+   "likely a confused/unresponsive cx2388[578] A/V decoder 
found @ 0x%x (%s)\n",
client->addr << 1, client->adapter->name);
-   v4l_err(client, "A method to reset it from the cx25840 driver"
-   " software is not known at this time\n");
+   v4l_err(client, "A method to reset it from the cx25840 driver 
software is not known at this time\n");
return -ENODEV;
} else {
v4l_dbg(1, cx25840_debug, client, "cx25840 not found\n");
diff --git a/drivers/media/i2c/cx25840/cx25840-ir.c 
b/drivers/media/i2c/cx25840/cx25840-ir.c
index 4b782012cadc..291f7d0a1c5c 100644
--- a/drivers/media/i2c/cx25840/cx25840-ir.c
+++ b/drivers/media/i2c/cx25840/cx25840-ir.c
@@ -1113,8 +1113,7 @@ int cx25840_ir_log_status(struct v4l2_subdev *sd)
j = 0;
break;
}
-   v4l2_info(sd, "\tNext carrier edge window:  16 clocks "
- "-%1d/+%1d, %u to %u Hz\n", i, j,
+   v4l2_info(sd, "\tNext carrier edge window:  16 clocks 
-%1d/+%1d, %u to %u Hz\n", i, j,
  clock_divider_to_freq(rxclk, 16 + j),
  clock_divider_to_freq(rxclk, 16 - i));
}
@@ -1124,8 +1123,7 @@ int cx25840_ir_log_status(struct v4l2_subdev *sd)
v4l2_info(sd, "\tLow pass filter:   %s\n",
  filtr ? "enabled" : "disabled");
if (filtr)
-   v4l2_info(sd, "\tMin acceptable pulse width (LPF):  %u us, "
- "%u ns\n",
+   v4l2_info(sd, "\tMin acceptable pulse width (LPF):  %u us, %u 
ns\n",
  lpf_count_to_us(filtr),
  lpf_count_to_ns(filtr));
v4l2_info(sd, "\tPulse width timer timed-out:   %s\n",
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 01/57] [media] b2c2: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/common/b2c2/flexcop-eeprom.c | 3 +--
 drivers/media/common/b2c2/flexcop-i2c.c| 3 +--
 drivers/media/common/b2c2/flexcop-misc.c   | 9 +++--
 drivers/media/common/b2c2/flexcop.c| 3 +--
 4 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/media/common/b2c2/flexcop-eeprom.c 
b/drivers/media/common/b2c2/flexcop-eeprom.c
index a25373a9bd84..844c7836c2a6 100644
--- a/drivers/media/common/b2c2/flexcop-eeprom.c
+++ b/drivers/media/common/b2c2/flexcop-eeprom.c
@@ -136,8 +136,7 @@ int flexcop_eeprom_check_mac_addr(struct flexcop_device 
*fc, int extended)
 
if ((ret = flexcop_eeprom_lrc_read(fc,0x3f8,buf,8,4)) == 0) {
if (extended != 0) {
-   err("TODO: extended (EUI64) MAC addresses aren't "
-   "completely supported yet");
+   err("TODO: extended (EUI64) MAC addresses aren't 
completely supported yet");
ret = -EINVAL;
} else
memcpy(fc->dvb_adapter.proposed_mac,buf,6);
diff --git a/drivers/media/common/b2c2/flexcop-i2c.c 
b/drivers/media/common/b2c2/flexcop-i2c.c
index e41cd23f8e45..1c1dc91ccd79 100644
--- a/drivers/media/common/b2c2/flexcop-i2c.c
+++ b/drivers/media/common/b2c2/flexcop-i2c.c
@@ -33,8 +33,7 @@ static int flexcop_i2c_operation(struct flexcop_device *fc,
return -EREMOTEIO;
}
}
-   deb_i2c("tried %d times i2c operation, "
-   "never finished or too many ack errors.\n", i);
+   deb_i2c("tried %d times i2c operation, never finished or too many ack 
errors.\n", i);
return -EREMOTEIO;
 }
 
diff --git a/drivers/media/common/b2c2/flexcop-misc.c 
b/drivers/media/common/b2c2/flexcop-misc.c
index b8eff235367d..bb0d95fe64f9 100644
--- a/drivers/media/common/b2c2/flexcop-misc.c
+++ b/drivers/media/common/b2c2/flexcop-misc.c
@@ -23,18 +23,15 @@ void flexcop_determine_revision(struct flexcop_device *fc)
fc->rev = FLEXCOP_III;
break;
default:
-   err("unknown FlexCop Revision: %x. Please report this to "
-   "linux-...@linuxtv.org.",
+   err("unknown FlexCop Revision: %x. Please report this to 
linux-...@linuxtv.org.",
v.misc_204.Rev_N_sig_revision_hi);
break;
}
 
if ((fc->has_32_hw_pid_filter = v.misc_204.Rev_N_sig_caps))
-   deb_info("this FlexCop has "
-   "the additional 32 hardware pid filter.\n");
+   deb_info("this FlexCop has the additional 32 hardware pid 
filter.\n");
else
-   deb_info("this FlexCop has "
-   "the 6 basic main hardware pid filter.\n");
+   deb_info("this FlexCop has the 6 basic main hardware pid 
filter.\n");
/* bus parts have to decide if hw pid filtering is used or not. */
 }
 
diff --git a/drivers/media/common/b2c2/flexcop.c 
b/drivers/media/common/b2c2/flexcop.c
index 0f5114d406f8..4338ab0043b4 100644
--- a/drivers/media/common/b2c2/flexcop.c
+++ b/drivers/media/common/b2c2/flexcop.c
@@ -46,8 +46,7 @@ int b2c2_flexcop_debug;
 EXPORT_SYMBOL_GPL(b2c2_flexcop_debug);
 module_param_named(debug, b2c2_flexcop_debug,  int, 0644);
 MODULE_PARM_DESC(debug,
-   "set debug level (1=info,2=tuner,4=i2c,8=ts,"
-   "16=sram,32=reg (|-able))."
+   "set debug level (1=info,2=tuner,4=i2c,8=ts,16=sram,32=reg 
(|-able))."
DEBSTATUS);
 #undef DEBSTATUS
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/57] don't break long lines on strings

2016-10-14 Thread Mauro Carvalho Chehab
There are lots of drivers on media that breaks long line strings in order to
fit into 80 columns. This was an usual practice to make checkpatch happy.
However, it makes harder to detect where the strings are with grep.

As we're right now fixing other drivers due to KERN_CONT, we need to be
able to identify what printk strings don't end with a "\n". It is a way easier
to detect those if we don't break long lines.

So, this patch series re-group those strings, violating the 80 columns limit
by purpose.

Later patches will rely on this series to identify the strings that require
KERN_CONT (or that should be converted to hexadecimal dumps).

Originally, I coded this as a single patch, but I opted to split it per
directory, as it makes easy for people to review.

I used the following perl script to merge the strings into a single
line (I ran it 10 times for each file):

#!/usr/bin/perl

while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
print "$next$c2\n";
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}

I did a few manual adjustments afterwards.

Mauro Carvalho Chehab (57):
  [media] b2c2: don't break long lines
  [media] dvb-frontends: don't break long lines
  [media] firewire: don't break long lines
  [media] cx25840: don't break long lines
  [media] smiapp: don't break long lines
  [media] soc_camera: don't break long lines
  [media] b2c2: don't break long lines
  [media] bt8xx: don't break long lines
  [media] cx18: don't break long lines
  [media] cx23885: don't break long lines
  [media] cx88: don't break long lines
  [media] ddbridge: don't break long lines
  [media] dm1105: don't break long lines
  [media] ivtv: don't break long lines
  [media] meye: don't break long lines
  [media] pt1: don't break long lines
  [media] saa7134: don't break long lines
  [media] saa7164: don't break long lines
  [media] solo6x10: don't break long lines
  [media] ttpci: don't break long lines
  [media] tw68: don't break long lines
  [media] davinci: don't break long lines
  [media] exynos4-is: don't break long lines
  [media] marvell-ccic: don't break long lines
  [media] omap: don't break long lines
  [media] omap3isp: don't break long lines
  [media] s5p-mfc: don't break long lines
  [media] c8sectpfe: don't break long lines
  [media] ti-vpe: don't break long lines
  [media] si470x: don't break long lines
  [media] si4713: don't break long lines
  [media] wl128x: don't break long lines
  [media] au0828: don't break long lines
  [media] b2c2: don't break long lines
  [media] cpia2: don't break long lines
  [media] cx231xx: don't break long lines
  [media] dvb-usb: don't break long lines
  [media] dvb-usb-v2: don't break long lines
  [media] em28xx: don't break long lines
  [media] hdpvr: don't break long lines
  [media] pvrusb2: don't break long lines
  [media] pwc: don't break long lines
  [media] siano: don't break long lines
  [media] stkwebcam: don't break long lines
  [media] tm6000: don't break long lines
  [media] ttusb-budget: don't break long lines
  [media] ttusb-dec: don't break long lines
  [media] usbvision: don't break long lines
  [media] uvc: don't break long lines
  [media] zr364xx: don't break long lines
  [media] v4l2-core: don't break long lines
  [media] common: don't break long lines
  [media] i2c: don't break long lines
  [media] platform: don't break long lines
  [media] radio: don't break long lines
  [media] rc: don't break long lines
  [media] tuners: don't break long lines

 drivers/media/common/b2c2/flexcop-eeprom.c |   3 +-
 drivers/media/common/b2c2/flexcop-i2c.c|   3 +-
 drivers/media/common/b2c2/flexcop-misc.c   |   9 +-
 drivers/media/common/b2c2/flexcop.c|   3 +-
 drivers/media/common/tveeprom.c|   3 +-
 drivers/media/dvb-frontends/au8522_common.c|   4 +-
 drivers/media/dvb-frontends/cx24110.c  |   4 +-
 drivers/media/dvb-frontends/cx24113.c  |   4 +-
 drivers/media/dvb-frontends/cx24116.c  |  10 +-
 drivers/media/dvb-frontends/cx24117.c  |   4 +-
 drivers/media/dvb-frontends/cx24123.c  |   4 +-
 drivers/media/dvb-frontends/ds3000.c   |  15 +-
 drivers/media/dvb-frontends/lgdt330x.c |   3 +-
 drivers/media/dvb-frontends/m88rs2000.c|  11 +-
 drivers/media/dvb-frontends/mt312.c|   7 +-
 drivers/media/dvb-frontends/nxt200x.c  |  11 +-
 drivers/media/dvb-frontends/or51132.c  

[PATCH 12/57] [media] ddbridge: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/ddbridge/ddbridge-core.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c 
b/drivers/media/pci/ddbridge/ddbridge-core.c
index 18e3a4deee64..a6c9fe235974 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -824,8 +824,7 @@ static int dvb_input_attach(struct ddb_input *input)
   &input->port->dev->pdev->dev,
   adapter_nr);
if (ret < 0) {
-   printk(KERN_ERR "ddbridge: Could not register adapter."
-  "Check if you enabled enough adapters in dvb-core!\n");
+   printk(KERN_ERR "ddbridge: Could not register adapter.Check if 
you enabled enough adapters in dvb-core!\n");
return ret;
}
input->attached = 1;
@@ -1730,8 +1729,7 @@ static __init int module_init_ddbridge(void)
 {
int ret;
 
-   printk(KERN_INFO "Digital Devices PCIE bridge driver, "
-  "Copyright (C) 2010-11 Digital Devices GmbH\n");
+   printk(KERN_INFO "Digital Devices PCIE bridge driver, Copyright (C) 
2010-11 Digital Devices GmbH\n");
 
ret = ddb_class_create();
if (ret < 0)
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 06/57] [media] soc_camera: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/soc_camera/ov772x.c | 3 +--
 drivers/media/i2c/soc_camera/ov9740.c | 3 +--
 drivers/media/i2c/soc_camera/tw9910.c | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/media/i2c/soc_camera/ov772x.c 
b/drivers/media/i2c/soc_camera/ov772x.c
index 7e68762b3a4b..985a3672b243 100644
--- a/drivers/media/i2c/soc_camera/ov772x.c
+++ b/drivers/media/i2c/soc_camera/ov772x.c
@@ -1064,8 +1064,7 @@ static int ov772x_probe(struct i2c_client *client,
 
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
dev_err(&adapter->dev,
-   "I2C-Adapter doesn't support "
-   "I2C_FUNC_SMBUS_BYTE_DATA\n");
+   "I2C-Adapter doesn't support 
I2C_FUNC_SMBUS_BYTE_DATA\n");
return -EIO;
}
 
diff --git a/drivers/media/i2c/soc_camera/ov9740.c 
b/drivers/media/i2c/soc_camera/ov9740.c
index 0da632d7d33a..f11f76cdacad 100644
--- a/drivers/media/i2c/soc_camera/ov9740.c
+++ b/drivers/media/i2c/soc_camera/ov9740.c
@@ -881,8 +881,7 @@ static int ov9740_video_probe(struct i2c_client *client)
goto done;
}
 
-   dev_info(&client->dev, "ov9740 Model ID 0x%04x, Revision 0x%02x, "
-"Manufacturer 0x%02x, SMIA Version 0x%02x\n",
+   dev_info(&client->dev, "ov9740 Model ID 0x%04x, Revision 0x%02x, 
Manufacturer 0x%02x, SMIA Version 0x%02x\n",
 priv->model, priv->revision, priv->manid, priv->smiaver);
 
ret = v4l2_ctrl_handler_setup(&priv->hdl);
diff --git a/drivers/media/i2c/soc_camera/tw9910.c 
b/drivers/media/i2c/soc_camera/tw9910.c
index 4002c07f3857..c9c49ed707b8 100644
--- a/drivers/media/i2c/soc_camera/tw9910.c
+++ b/drivers/media/i2c/soc_camera/tw9910.c
@@ -947,8 +947,7 @@ static int tw9910_probe(struct i2c_client *client,
 
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
dev_err(&client->dev,
-   "I2C-Adapter doesn't support "
-   "I2C_FUNC_SMBUS_BYTE_DATA\n");
+   "I2C-Adapter doesn't support 
I2C_FUNC_SMBUS_BYTE_DATA\n");
return -EIO;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 05/57] [media] smiapp: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/smiapp/smiapp-regs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/i2c/smiapp/smiapp-regs.c 
b/drivers/media/i2c/smiapp/smiapp-regs.c
index 1e501c06d18c..f1ba4a2712ce 100644
--- a/drivers/media/i2c/smiapp/smiapp-regs.c
+++ b/drivers/media/i2c/smiapp/smiapp-regs.c
@@ -268,8 +268,7 @@ int smiapp_write_no_quirk(struct smiapp_sensor *sensor, u32 
reg, u32 val)
if (r == 1) {
if (retries)
dev_err(&client->dev,
-   "sensor i2c stall encountered. "
-   "retries: %d\n", retries);
+   "sensor i2c stall encountered. retries: 
%d\n", retries);
return 0;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 11/25] [media] dvb-core: use pr_foo() instead of printk()

2016-10-14 Thread SF Markus Elfring
> diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c
> index 7b67e1dd97fd..1e96a6f1b6f0 100644
> --- a/drivers/media/dvb-core/dmxdev.c
> +++ b/drivers/media/dvb-core/dmxdev.c
> @@ -20,6 +20,8 @@
>   *
>   */
>  
> +#define pr_fmt(fmt) "dmxdev: " fmt
> +
>  #include 
>  #include 
>  #include 

How do you think to use an approach like the following there?


+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt


   or eventually


+#define MY_LOG_PREFIX KBUILD_MODNAME ": "
+#define pr_fmt(fmt) MY_LOG_PREFIX fmt


Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: V4L2_DEC_CMD_STOP and last_buffer_dequeued

2016-10-14 Thread Nicolas Dufresne
Le mercredi 12 octobre 2016 à 23:33 +0800, Wu-Cheng Li (李務誠) a écrit :
> I'm trying to use V4L2_DEC_CMD_STOP to implement flush. First the
> userspace sent V4L2_DEC_CMD_STOP to initiate the flush. The driver
> set
> V4L2_BUF_FLAG_LAST on the last CAPTURE buffer. I thought implementing
> V4L2_DEC_CMD_START in the driver was enough to start the decoder. But
> last_buffer_dequeued had been set to true in v4l2 core. I couldn't
> clear last_buffer_dequeued without calling STREAMOFF from the
> userspace. If I need to call STREAMOFF/STREAMON after
> V4L2_DEC_CMD_STOP, it looks like V4L2_DEC_CMD_START is not useful.
> Did
> I miss anything?

It's likely what the driver do is slightly off what the spec say. All
user space code so far seems to only drain at EOS. As the next buffer
is a new stream, it make sense to completely reset the encoder. We'd
need to review that, but using CMD_START should work if you queue a
header first.

Note that for many a flush is the action of getting rid of the pending
images and achieve by using STREAMOFF. While the effect of CMD_STOP is
to signal the decoder that no more encoded image will be queued, hence
remaining images should be delivered to userspace. They will
differentiate as a flush operation vs as drain operation. This is no
rocket science of course.

regards,
Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 13/25] [media] dvb_demux: uncomment a packet loss check code

2016-10-14 Thread Mauro Carvalho Chehab
There is a commented code that also detects packet loss.
Uncomment it and put into the DVB_DEMUX_SECTION_LOSS_LOG
debug Kconfig option.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/dvb-core/dvb_demux.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb-core/dvb_demux.c 
b/drivers/media/dvb-core/dvb_demux.c
index 5a69b0bda4bb..51bf5eb2df49 100644
--- a/drivers/media/dvb-core/dvb_demux.c
+++ b/drivers/media/dvb-core/dvb_demux.c
@@ -110,21 +110,23 @@ static inline int dvb_dmx_swfilter_payload(struct 
dvb_demux_feed *feed,
 {
int count = payload(buf);
int p;
-   //int ccok;
-   //u8 cc;
+#ifdef CONFIG_DVB_DEMUX_SECTION_LOSS_LOG
+   int ccok;
+   u8 cc;
+#endif
 
if (count == 0)
return -1;
 
p = 188 - count;
 
-   /*
+#ifdef CONFIG_DVB_DEMUX_SECTION_LOSS_LOG
cc = buf[3] & 0x0f;
ccok = ((feed->cc + 1) & 0x0f) == cc;
feed->cc = cc;
if (!ccok)
dprintk("missed packet!\n");
-   */
+#endif
 
if (buf[1] & 0x40)  // PUSI ?
feed->peslen = 0xfffa;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 06/25] [media] em28xx: convert the remaining printks to pr_foo

2016-10-14 Thread Mauro Carvalho Chehab
There are still several places with printk's called directly.

Convert them to pr_foo() macros, except for the debug printk's,
as those are enabled via modprobe vars.

While here, realign the pr_foo() arguments to match the
recommended CodingStyle.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/em28xx/em28xx-audio.c  | 10 ++---
 drivers/media/usb/em28xx/em28xx-camera.c | 21 +
 drivers/media/usb/em28xx/em28xx-cards.c  | 67 -
 drivers/media/usb/em28xx/em28xx-core.c   | 47 ++--
 drivers/media/usb/em28xx/em28xx-dvb.c| 39 -
 drivers/media/usb/em28xx/em28xx-i2c.c| 74 
 drivers/media/usb/em28xx/em28xx-input.c  |  2 +-
 drivers/media/usb/em28xx/em28xx-vbi.c|  7 +--
 drivers/media/usb/em28xx/em28xx-video.c  | 46 +---
 9 files changed, 146 insertions(+), 167 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-audio.c 
b/drivers/media/usb/em28xx/em28xx-audio.c
index b5f35a25d870..06e495615296 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -56,9 +56,8 @@ MODULE_PARM_DESC(debug, "activates debug info");
 
 #define dprintk(fmt, arg...) do {  \
if (debug)  \
-   printk(KERN_INFO "em28xx-audio %s: " fmt,   \
- __func__, ##arg); \
-   } while (0)
+   printk(KERN_DEBUG pr_fmt("audio: %s: " fmt),\
+__func__, ##arg); } while (0)
 
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
 
@@ -902,9 +901,8 @@ static int em28xx_audio_init(struct em28xx *dev)
 
kref_get(&dev->ref);
 
-   printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus 
Rechberger\n");
-   printk(KERN_INFO
-  "em28xx-audio.c: Copyright (C) 2007-2016 Mauro Carvalho 
Chehab\n");
+   pr_info("em28xx-audio.c: Copyright (C) 2006 Markus Rechberger\n");
+   pr_info("em28xx-audio.c: Copyright (C) 2007-2016 Mauro Carvalho 
Chehab\n");
 
err = snd_card_new(&dev->udev->dev, index[devnr], "Em28xx Audio",
   THIS_MODULE, 0, &card);
diff --git a/drivers/media/usb/em28xx/em28xx-camera.c 
b/drivers/media/usb/em28xx/em28xx-camera.c
index bc07166e7df0..a24695474212 100644
--- a/drivers/media/usb/em28xx/em28xx-camera.c
+++ b/drivers/media/usb/em28xx/em28xx-camera.c
@@ -121,13 +121,13 @@ static int em28xx_probe_sensor_micron(struct em28xx *dev)
if (ret < 0) {
if (ret != -ENXIO)
pr_err("couldn't read from i2c device 0x%02x: 
error %i\n",
- client.addr << 1, ret);
+  client.addr << 1, ret);
continue;
}
ret = i2c_master_recv(&client, (u8 *)&id_be, 2);
if (ret < 0) {
pr_err("couldn't read from i2c device 0x%02x: error 
%i\n",
- client.addr << 1, ret);
+  client.addr << 1, ret);
continue;
}
id = be16_to_cpu(id_be);
@@ -136,13 +136,13 @@ static int em28xx_probe_sensor_micron(struct em28xx *dev)
ret = i2c_master_send(&client, ®, 1);
if (ret < 0) {
pr_err("couldn't read from i2c device 0x%02x: error 
%i\n",
- client.addr << 1, ret);
+  client.addr << 1, ret);
continue;
}
ret = i2c_master_recv(&client, (u8 *)&id_be, 2);
if (ret < 0) {
pr_err("couldn't read from i2c device 0x%02x: error 
%i\n",
- client.addr << 1, ret);
+  client.addr << 1, ret);
continue;
}
/* Validate chip ID to be sure we have a Micron device */
@@ -180,8 +180,7 @@ static int em28xx_probe_sensor_micron(struct em28xx *dev)
dev->em28xx_sensor = EM28XX_MT9M001;
break;
default:
-   pr_info("unknown Micron sensor detected: 0x%04x\n",
-   id);
+   pr_info("unknown Micron sensor detected: 0x%04x\n", id);
return 0;
}
 
@@ -219,7 +218,7 @@ static int em28xx_probe_sensor_omnivision(struct em28xx 
*dev)
if (ret < 0) {
if (ret != -ENXIO)
pr_err("couldn't read from i2c device 0x%02x: 
error %i\n",
- client.addr << 1, ret);
+  client.addr

[PATCH 16/25] [media] dvb_filter: get rid of dead code

2016-10-14 Thread Mauro Carvalho Chehab
There are lots of stuff here commented out for a really
long time. Get rid of them. If one wants it again, it
could always use git log.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/ttpci/dvb_filter.c | 485 ---
 1 file changed, 485 deletions(-)

diff --git a/drivers/media/pci/ttpci/dvb_filter.c 
b/drivers/media/pci/ttpci/dvb_filter.c
index 6395812ed1f1..227f93e2ef10 100644
--- a/drivers/media/pci/ttpci/dvb_filter.c
+++ b/drivers/media/pci/ttpci/dvb_filter.c
@@ -3,13 +3,6 @@
 #include 
 #include "dvb_filter.h"
 
-#if 0
-static unsigned int bitrates[3][16] =
-{{0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,0},
- {0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,0},
- {0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,0}};
-#endif
-
 static u32 freq[4] = {480, 441, 320, 0};
 
 static unsigned int ac3_bitrates[32] =
@@ -25,323 +18,6 @@ static u32 ac3_frames[3][32] =
   1536,1728,1920,0,0,0,0,0,0,0,0,0,0,0,0,0}};
 
 
-
-#if 0
-static void setup_ts2pes(ipack *pa, ipack *pv, u16 *pida, u16 *pidv,
- void (*pes_write)(u8 *buf, int count, void *data),
- void *priv)
-{
-   dvb_filter_ipack_init(pa, IPACKS, pes_write);
-   dvb_filter_ipack_init(pv, IPACKS, pes_write);
-   pa->pid = pida;
-   pv->pid = pidv;
-   pa->data = priv;
-   pv->data = priv;
-}
-#endif
-
-#if 0
-static void ts_to_pes(ipack *p, u8 *buf) // don't need count (=188)
-{
-   u8 off = 0;
-
-   if (!buf || !p ){
-   printk("NULL POINTER IDIOT\n");
-   return;
-   }
-   if (buf[1]&PAY_START) {
-   if (p->plength == MMAX_PLENGTH-6 && p->found>6){
-   p->plength = p->found-6;
-   p->found = 0;
-   send_ipack(p);
-   dvb_filter_ipack_reset(p);
-   }
-   }
-   if (buf[3] & ADAPT_FIELD) {  // adaptation field?
-   off = buf[4] + 1;
-   if (off+4 > 187) return;
-   }
-   dvb_filter_instant_repack(buf+4+off, TS_SIZE-4-off, p);
-}
-#endif
-
-#if 0
-/* needs 5 byte input, returns picture coding type*/
-static int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, 
int pr)
-{
-   u8 pct;
-
-   if (pr) printk( "Pic header: ");
-   pic->temporal_reference[field] = (( headr[0] << 2 ) |
- (headr[1] & 0x03) )& 0x03ff;
-   if (pr) printk( " temp ref: 0x%04x", pic->temporal_reference[field]);
-
-   pct = ( headr[1] >> 2 ) & 0x07;
-   pic->picture_coding_type[field] = pct;
-   if (pr) {
-   switch(pct){
-   case I_FRAME:
-   printk( "  I-FRAME");
-   break;
-   case B_FRAME:
-   printk( "  B-FRAME");
-   break;
-   case P_FRAME:
-   printk( "  P-FRAME");
-   break;
-   }
-   }
-
-
-   pic->vinfo.vbv_delay  = (( headr[1] >> 5 ) | ( headr[2] << 3) |
-( (headr[3] & 0x1F) << 11) ) & 0x;
-
-   if (pr) printk( " vbv delay: 0x%04x", pic->vinfo.vbv_delay);
-
-   pic->picture_header_parameter = ( headr[3] & 0xe0 ) |
-   ((headr[4] & 0x80) >> 3);
-
-   if ( pct == B_FRAME ){
-   pic->picture_header_parameter |= ( headr[4] >> 3 ) & 0x0f;
-   }
-   if (pr) printk( " pic head param: 0x%x",
-   pic->picture_header_parameter);
-
-   return pct;
-}
-#endif
-
-#if 0
-/* needs 4 byte input */
-static int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
-{
-   if (pr) printk("GOP header: ");
-
-   pic->time_code  = (( headr[0] << 17 ) | ( headr[1] << 9) |
-  ( headr[2] << 1 ) | (headr[3] &0x01)) & 0x1ff;
-
-   if (pr) printk(" time: %d:%d.%d ", (headr[0]>>2)& 0x1F,
-  ((headr[0]<<4)& 0x30)| ((headr[1]>>4)& 0x0F),
-  ((headr[1]<<3)& 0x38)| ((headr[2]>>5)& 0x0F));
-
-   if ( ( headr[3] & 0x40 ) != 0 ){
-   pic->closed_gop = 1;
-   } else {
-   pic->closed_gop = 0;
-   }
-   if (pr) printk("closed: %d", pic->closed_gop);
-
-   if ( ( headr[3] & 0x20 ) != 0 ){
-   pic->broken_link = 1;
-   } else {
-   pic->broken_link = 0;
-   }
-   if (pr) printk(" broken: %d\n", pic->broken_link);
-
-   return 0;
-}
-#endif
-
-#if 0
-/* needs 8 byte input */
-static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
-{
-   int sw;
-   int form = -1;
-
-   if (pr) printk("Reading sequence header\n");
-
-   vi->horizontal_size = ((headr[1] &0xF0) >> 4) | (headr[0] << 4);
-   vi->vertical_size   = ((headr[1] &0x0F) << 8) | (headr[2]);
-
-   sw = (in

[PATCH 10/25] [media] radio-bcm2048: don't ignore errors

2016-10-14 Thread Mauro Carvalho Chehab
Remove this warning:

drivers/staging/media/bcm2048/radio-bcm2048.c: In function 
'bcm2048_set_rds_no_lock':
drivers/staging/media/bcm2048/radio-bcm2048.c:467:6: warning: variable 'err' 
set but not used [-Wunused-but-set-variable]
  int err;
  ^~~

By returning the error code.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c 
b/drivers/staging/media/bcm2048/radio-bcm2048.c
index ea15cc638097..4d9bd02ede47 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -482,6 +482,8 @@ static int bcm2048_set_rds_no_lock(struct bcm2048_device 
*bdev, u8 rds_on)
   flags);
memset(&bdev->rds_info, 0, sizeof(bdev->rds_info));
}
+   if (err)
+   return err;
 
return bcm2048_send_command(bdev, BCM2048_I2C_FM_RDS_SYSTEM,
bdev->cache_fm_rds_system);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 24/25] [media] dvb-pll: use pr_foo() macros instead of printk()

2016-10-14 Thread Mauro Carvalho Chehab
Replace printk() macros by their pr_foo() counterparts.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/dvb-frontends/dvb-pll.c | 19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/media/dvb-frontends/dvb-pll.c 
b/drivers/media/dvb-frontends/dvb-pll.c
index 735a96662022..b6d199196b83 100644
--- a/drivers/media/dvb-frontends/dvb-pll.c
+++ b/drivers/media/dvb-frontends/dvb-pll.c
@@ -18,6 +18,8 @@
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include 
 #include 
 #include 
@@ -25,6 +27,9 @@
 
 #include "dvb-pll.h"
 
+#define dprintk(fmt, arg...) \
+   printk(KERN_DEBUG pr_fmt("%s: " fmt), __func__, ##arg)
+
 struct dvb_pll_priv {
/* pll number */
int nr;
@@ -362,7 +367,7 @@ static void opera1_bw(struct dvb_frontend *fe, u8 *buf)
 
result = i2c_transfer(priv->i2c, &msg, 1);
if (result != 1)
-   printk(KERN_ERR "%s: i2c_transfer failed:%d",
+   pr_err("%s: i2c_transfer failed:%d",
__func__, result);
 
if (b_w <= 1)
@@ -432,7 +437,7 @@ static void samsung_dtos403ih102a_set(struct dvb_frontend 
*fe, u8 *buf)
 
result = i2c_transfer(priv->i2c, &msg, 1);
if (result != 1)
-   printk(KERN_ERR "%s: i2c_transfer failed:%d",
+   pr_err("%s: i2c_transfer failed:%d",
__func__, result);
 
buf[2] = 0x9e;
@@ -578,7 +583,7 @@ static int dvb_pll_configure(struct dvb_frontend *fe, u8 
*buf,
}
 
if (debug)
-   printk("pll: %s: freq=%d | i=%d/%d\n", desc->name,
+   dprintk("pll: %s: freq=%d | i=%d/%d\n", desc->name,
   frequency, i, desc->count);
if (i == desc->count)
return -EINVAL;
@@ -594,7 +599,7 @@ static int dvb_pll_configure(struct dvb_frontend *fe, u8 
*buf,
desc->set(fe, buf);
 
if (debug)
-   printk("pll: %s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n",
+   dprintk("pll: %s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n",
   desc->name, div, buf[0], buf[1], buf[2], buf[3]);
 
// calculate the frequency we set it to
@@ -803,10 +808,10 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend 
*fe, int pll_addr,
fe->tuner_priv = priv;
 
if ((debug) || (id[priv->nr] == pll_desc_id)) {
-   printk("dvb-pll[%d]", priv->nr);
+   dprintk("dvb-pll[%d]", priv->nr);
if (i2c != NULL)
-   printk(" %d-%04x", i2c_adapter_id(i2c), pll_addr);
-   printk(": id# %d (%s) attached, %s\n", pll_desc_id, desc->name,
+   pr_cont(" %d-%04x", i2c_adapter_id(i2c), pll_addr);
+   pr_cont(": id# %d (%s) attached, %s\n", pll_desc_id, desc->name,
   id[priv->nr] == pll_desc_id ?
"insmod option" : "autodetected");
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 20/25] [media] mt20xx: use %*ph to do small hexa dumps

2016-10-14 Thread Mauro Carvalho Chehab
Since commit 563873318d32 ("Merge branch 'printk-cleanups"),
continuation lines require KERN_CONT. Instead, let's just
use %*ph to print the buffer.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/tuners/mt20xx.c | 21 +
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/drivers/media/tuners/mt20xx.c b/drivers/media/tuners/mt20xx.c
index 52da4671b0e0..29dadd171b31 100644
--- a/drivers/media/tuners/mt20xx.c
+++ b/drivers/media/tuners/mt20xx.c
@@ -487,13 +487,8 @@ static void mt2050_set_if_freq(struct dvb_frontend 
*fe,unsigned int freq, unsign
buf[5]=div2a;
if(num2!=0) buf[5]=buf[5]|0x40;
 
-   if (debug > 1) {
-   int i;
-   tuner_dbg("bufs is: ");
-   for(i=0;i<6;i++)
-   printk("%x ",buf[i]);
-   printk("\n");
-   }
+   if (debug > 1)
+   tuner_dbg("bufs is: %*ph\n", 6, buf);
 
ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,6);
if (ret!=6)
@@ -619,15 +614,9 @@ struct dvb_frontend *microtune_attach(struct dvb_frontend 
*fe,
 
tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
tuner_i2c_xfer_recv(&priv->i2c_props,buf,21);
-   if (debug) {
-   int i;
-   tuner_dbg("MT20xx hexdump:");
-   for(i=0;i<21;i++) {
-   printk(" %02x",buf[i]);
-   if(((i+1)%8)==0) printk(" ");
-   }
-   printk("\n");
-   }
+   if (debug)
+   tuner_dbg("MT20xx hexdump: %*ph\n", 21, buf);
+
company_code = buf[0x11] << 8 | buf[0x12];
tuner_info("microtune: companycode=%04x part=%02x rev=%02x\n",
   company_code,buf[0x13],buf[0x14]);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 19/25] [media] imon: use %*ph to do small hexa dumps

2016-10-14 Thread Mauro Carvalho Chehab
Since commit 563873318d32 ("Merge branch 'printk-cleanups"),
continuation lines require KERN_CONT. Instead, let's just
use %*ph to print the buffer.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/rc/imon.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index 86cc70fe2534..d62b1f38292c 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -1593,7 +1593,6 @@ static void imon_incoming_packet(struct imon_context 
*ictx,
struct device *dev = ictx->dev;
unsigned long flags;
u32 kc;
-   int i;
u64 scancode;
int press_type = 0;
int msec;
@@ -1664,10 +1663,8 @@ static void imon_incoming_packet(struct imon_context 
*ictx,
}
 
if (debug) {
-   printk(KERN_INFO "intf%d decoded packet: ", intf);
-   for (i = 0; i < len; ++i)
-   printk("%02x ", buf[i]);
-   printk("\n");
+   printk(KERN_INFO "intf%d decoded packet: %*ph\n",
+  intf, len, buf);
}
 
press_type = imon_parse_press_type(ictx, buf, ktype);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 11/25] [media] dvb-core: use pr_foo() instead of printk()

2016-10-14 Thread Mauro Carvalho Chehab
The dvb-core directly calls printk() without using the modern
printk macros, or using the proper printk levels. Change it
to use pr_foo().

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/dvb-core/dmxdev.c | 24 ++
 drivers/media/dvb-core/dvb_ca_en50221.c | 57 ++-
 drivers/media/dvb-core/dvb_demux.c  | 46 ++
 drivers/media/dvb-core/dvb_frontend.c   | 12 +++--
 drivers/media/dvb-core/dvb_net.c| 82 ++---
 drivers/media/dvb-core/dvbdev.c | 25 ++
 6 files changed, 146 insertions(+), 100 deletions(-)

diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c
index 7b67e1dd97fd..1e96a6f1b6f0 100644
--- a/drivers/media/dvb-core/dmxdev.c
+++ b/drivers/media/dvb-core/dmxdev.c
@@ -20,6 +20,8 @@
  *
  */
 
+#define pr_fmt(fmt) "dmxdev: " fmt
+
 #include 
 #include 
 #include 
@@ -36,7 +38,11 @@ static int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
 
-#define dprintkif (debug) printk
+#define dprintk(fmt, arg...) do {  \
+   if (debug)  \
+   printk(KERN_DEBUG pr_fmt("%s: " fmt),   \
+   __func__, ##arg);   \
+} while (0)
 
 static int dvb_dmxdev_buffer_write(struct dvb_ringbuffer *buf,
   const u8 *src, size_t len)
@@ -50,7 +56,7 @@ static int dvb_dmxdev_buffer_write(struct dvb_ringbuffer *buf,
 
free = dvb_ringbuffer_free(buf);
if (len > free) {
-   dprintk("dmxdev: buffer overflow\n");
+   dprintk("buffer overflow\n");
return -EOVERFLOW;
}
 
@@ -126,7 +132,7 @@ static int dvb_dvr_open(struct inode *inode, struct file 
*file)
struct dmxdev *dmxdev = dvbdev->priv;
struct dmx_frontend *front;
 
-   dprintk("function : %s\n", __func__);
+   dprintk("%s\n", __func__);
 
if (mutex_lock_interruptible(&dmxdev->mutex))
return -ERESTARTSYS;
@@ -258,7 +264,7 @@ static int dvb_dvr_set_buffer_size(struct dmxdev *dmxdev,
void *newmem;
void *oldmem;
 
-   dprintk("function : %s\n", __func__);
+   dprintk("%s\n", __func__);
 
if (buf->size == size)
return 0;
@@ -367,7 +373,7 @@ static int dvb_dmxdev_section_callback(const u8 *buffer1, 
size_t buffer1_len,
return 0;
}
del_timer(&dmxdevfilter->timer);
-   dprintk("dmxdev: section callback %*ph\n", 6, buffer1);
+   dprintk("section callback %*ph\n", 6, buffer1);
ret = dvb_dmxdev_buffer_write(&dmxdevfilter->buffer, buffer1,
  buffer1_len);
if (ret == buffer1_len) {
@@ -655,7 +661,7 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter 
*filter)
   secfeed,
   
dvb_dmxdev_section_callback);
if (ret < 0) {
-   printk("DVB (%s): could not alloc feed\n",
+   pr_err("DVB (%s): could not alloc feed\n",
   __func__);
return ret;
}
@@ -663,7 +669,7 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter 
*filter)
ret = (*secfeed)->set(*secfeed, para->pid, 32768,
  (para->flags & DMX_CHECK_CRC) ? 1 
: 0);
if (ret < 0) {
-   printk("DVB (%s): could not set feed\n",
+   pr_err("DVB (%s): could not set feed\n",
   __func__);
dvb_dmxdev_feed_restart(filter);
return ret;
@@ -844,7 +850,7 @@ static int dvb_dmxdev_filter_set(struct dmxdev *dmxdev,
 struct dmxdev_filter *dmxdevfilter,
 struct dmx_sct_filter_params *params)
 {
-   dprintk("function : %s, PID=0x%04x, flags=%02x, timeout=%d\n",
+   dprintk("%s: PID=0x%04x, flags=%02x, timeout=%d\n",
__func__, params->pid, params->flags, params->timeout);
 
dvb_dmxdev_filter_stop(dmxdevfilter);
@@ -1184,7 +1190,7 @@ static unsigned int dvb_dvr_poll(struct file *file, 
poll_table *wait)
struct dmxdev *dmxdev = dvbdev->priv;
unsigned int mask = 0;
 
-   dprintk("function : %s\n", __func__);
+   dprintk("%s\n", __func__);
 
if (dmxdev->exit)
return POLLERR;
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c 
b/drivers/media/dvb-core/dvb_ca_en50221.c
index b5b5b195ea7f..262a492e7c08 100644
--- a/drivers/media/dvb-core/dvb_c

[PATCH 21/25] [media] tvaudio: mark printk continuation lines as such

2016-10-14 Thread Mauro Carvalho Chehab
This driver has printk continuation lines for
debugging purposes. Since commit 563873318d32
("Merge branch 'printk-cleanups'"), this won't work as expected
anymore. So, let's add KERN_CONT to those lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/tvaudio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/tvaudio.c b/drivers/media/i2c/tvaudio.c
index 42d1e26e581c..ce86534450ac 100644
--- a/drivers/media/i2c/tvaudio.c
+++ b/drivers/media/i2c/tvaudio.c
@@ -1894,8 +1894,9 @@ static int tvaudio_probe(struct i2c_client *client, const 
struct i2c_device_id *
printk(KERN_INFO "tvaudio: TV audio decoder + audio/video mux 
driver\n");
printk(KERN_INFO "tvaudio: known chips: ");
for (desc = chiplist; desc->name != NULL; desc++)
-   printk("%s%s", (desc == chiplist) ? "" : ", ", 
desc->name);
-   printk("\n");
+   printk(KERN_CONT "%s%s",
+  (desc == chiplist) ? "" : ", ", desc->name);
+   printk(KERN_CONT "\n");
}
 
chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 12/25] [media] dvb_demux: convert an internal ifdef into a Kconfig option

2016-10-14 Thread Mauro Carvalho Chehab
There are some ifdefs inside the dvb_demux that are meant to
enable advanced debug capabilities, at the cost of being very
verbose.

Keeping those as internal ifdefs is a very bad idea, as it
doesn't make easy to check if the code there was broken by
some patch. So, let's add an explicit Kconfig option for it.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/dvb-core/Kconfig | 13 +
 drivers/media/dvb-core/dvb_demux.c | 14 +-
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/media/dvb-core/Kconfig b/drivers/media/dvb-core/Kconfig
index fa7a2490ed5f..8964f1d3cf57 100644
--- a/drivers/media/dvb-core/Kconfig
+++ b/drivers/media/dvb-core/Kconfig
@@ -27,3 +27,16 @@ config DVB_DYNAMIC_MINORS
  will be required to manage the device nodes.
 
  If you are unsure about this, say N here.
+
+config DVB_DEMUX_SECTION_LOSS_LOG
+   bool "Enable DVB demux section packet loss log"
+   depends on DVB_CORE
+   default n
+   help
+ Enable extra log messages meant to detect packet loss
+ inside the Kernel.
+
+ Should not be enabled on normal cases, as logs can
+ be very verbose.
+
+ If you are unsure about this, say N here.
diff --git a/drivers/media/dvb-core/dvb_demux.c 
b/drivers/media/dvb-core/dvb_demux.c
index a0a1f8456c54..5a69b0bda4bb 100644
--- a/drivers/media/dvb-core/dvb_demux.c
+++ b/drivers/media/dvb-core/dvb_demux.c
@@ -37,10 +37,6 @@
 #include "dvb_demux.h"
 
 #define NOBUFS
-/*
-** #define DVB_DEMUX_SECTION_LOSS_LOG to monitor payload loss in the syslog
-*/
-// #define DVB_DEMUX_SECTION_LOSS_LOG
 
 static int dvb_demux_tscheck;
 module_param(dvb_demux_tscheck, int, 0644);
@@ -194,7 +190,7 @@ static void dvb_dmx_swfilter_section_new(struct 
dvb_demux_feed *feed)
 {
struct dmx_section_feed *sec = &feed->feed.sec;
 
-#ifdef DVB_DEMUX_SECTION_LOSS_LOG
+#ifdef CONFIG_DVB_DEMUX_SECTION_LOSS_LOG
if (sec->secbufp < sec->tsfeedp) {
int i, n = sec->tsfeedp - sec->secbufp;
 
@@ -247,7 +243,7 @@ static int dvb_dmx_swfilter_section_copy_dump(struct 
dvb_demux_feed *feed,
return 0;
 
if (sec->tsfeedp + len > DMX_MAX_SECFEED_SIZE) {
-#ifdef DVB_DEMUX_SECTION_LOSS_LOG
+#ifdef CONFIG_DVB_DEMUX_SECTION_LOSS_LOG
dprintk("dvb_demux.c section buffer full loss: %d/%d\n",
   sec->tsfeedp + len - DMX_MAX_SECFEED_SIZE,
   DMX_MAX_SECFEED_SIZE);
@@ -281,7 +277,7 @@ static int dvb_dmx_swfilter_section_copy_dump(struct 
dvb_demux_feed *feed,
/* dump [secbuf .. secbuf+seclen) */
if (feed->pusi_seen)
dvb_dmx_swfilter_section_feed(feed);
-#ifdef DVB_DEMUX_SECTION_LOSS_LOG
+#ifdef CONFIG_DVB_DEMUX_SECTION_LOSS_LOG
else
dprintk("dvb_demux.c pusi not seen, discarding section 
data\n");
 #endif
@@ -317,7 +313,7 @@ static int dvb_dmx_swfilter_section_packet(struct 
dvb_demux_feed *feed,
}
 
if (!ccok || dc_i) {
-#ifdef DVB_DEMUX_SECTION_LOSS_LOG
+#ifdef CONFIG_DVB_DEMUX_SECTION_LOSS_LOG
dprintk("dvb_demux.c discontinuity detected %d bytes lost\n",
count);
/*
@@ -349,7 +345,7 @@ static int dvb_dmx_swfilter_section_packet(struct 
dvb_demux_feed *feed,
dvb_dmx_swfilter_section_copy_dump(feed, after,
   after_len);
}
-#ifdef DVB_DEMUX_SECTION_LOSS_LOG
+#ifdef CONFIG_DVB_DEMUX_SECTION_LOSS_LOG
else if (count > 0)
dprintk("dvb_demux.c PUSI=1 but %d bytes lost\n",
count);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 03/25] [media] em28xx: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/em28xx/em28xx-audio.c | 10 +++
 drivers/media/usb/em28xx/em28xx-cards.c | 51 -
 drivers/media/usb/em28xx/em28xx-core.c  | 11 ---
 drivers/media/usb/em28xx/em28xx-dvb.c   |  6 ++--
 drivers/media/usb/em28xx/em28xx-input.c |  3 +-
 drivers/media/usb/em28xx/em28xx-video.c |  6 ++--
 6 files changed, 33 insertions(+), 54 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-audio.c 
b/drivers/media/usb/em28xx/em28xx-audio.c
index e11fe46a547c..2a3975b1aea5 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -3,7 +3,7 @@
  *
  *  Copyright (C) 2006 Markus Rechberger 
  *
- *  Copyright (C) 2007-2014 Mauro Carvalho Chehab
+ *  Copyright (C) 2007-2016 Mauro Carvalho Chehab
  * - Port to work with the in-kernel driver
  * - Cleanups, fixes, alsa-controls, etc.
  *
@@ -254,8 +254,7 @@ static int snd_em28xx_capture_open(struct snd_pcm_substream 
*substream)
int nonblock, ret = 0;
 
if (!dev) {
-   em28xx_err("BUG: em28xx can't find device struct."
-   " Can't proceed with open\n");
+   em28xx_err("BUG: em28xx can't find device struct. Can't proceed 
with open\n");
return -ENODEV;
}
 
@@ -902,10 +901,9 @@ static int em28xx_audio_init(struct em28xx *dev)
 
kref_get(&dev->ref);
 
-   printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus "
-"Rechberger\n");
+   printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus 
Rechberger\n");
printk(KERN_INFO
-  "em28xx-audio.c: Copyright (C) 2007-2014 Mauro Carvalho 
Chehab\n");
+  "em28xx-audio.c: Copyright (C) 2007-2016 Mauro Carvalho 
Chehab\n");
 
err = snd_card_new(&dev->udev->dev, index[devnr], "Em28xx Audio",
   THIS_MODULE, 0, &card);
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c 
b/drivers/media/usb/em28xx/em28xx-cards.c
index e397f544f108..bed41c1b4817 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -2832,13 +2832,10 @@ static int em28xx_hint_board(struct em28xx *dev)
dev->tuner_type = em28xx_eeprom_hash[i].tuner;
 
em28xx_errdev("Your board has no unique USB ID.\n");
-   em28xx_errdev("A hint were successfully done, "
- "based on eeprom hash.\n");
+   em28xx_errdev("A hint were successfully done, based on 
eeprom hash.\n");
em28xx_errdev("This method is not 100%% failproof.\n");
-   em28xx_errdev("If the board were missdetected, "
- "please email this log to:\n");
-   em28xx_errdev("\tV4L Mailing List "
- " \n");
+   em28xx_errdev("If the board were missdetected, please 
email this log to:\n");
+   em28xx_errdev("\tV4L Mailing List  
\n");
em28xx_errdev("Board detected as %s\n",
  em28xx_boards[dev->model].name);
 
@@ -2864,13 +2861,10 @@ static int em28xx_hint_board(struct em28xx *dev)
dev->model = em28xx_i2c_hash[i].model;
dev->tuner_type = em28xx_i2c_hash[i].tuner;
em28xx_errdev("Your board has no unique USB ID.\n");
-   em28xx_errdev("A hint were successfully done, "
- "based on i2c devicelist hash.\n");
+   em28xx_errdev("A hint were successfully done, based on 
i2c devicelist hash.\n");
em28xx_errdev("This method is not 100%% failproof.\n");
-   em28xx_errdev("If the board were missdetected, "
- "please email this log to:\n");
-   em28xx_errdev("\tV4L Mailing List "
- " \n");
+   em28xx_errdev("If the board were missdetected, please 
email this log to:\n");
+   em28xx_errdev("\tV4L Mailing List  
\n");
em28xx_errdev("Board detected as %s\n",
  em28xx_boards[dev->model].name);
 
@@ -2878,17 +2872,14 @@ static int em28xx_hint_board(struct em28xx *dev)
}
}
 
-   em28xx_errdev("Your board has no unique USB ID and thus need a "
- "hint to be detected.\n");
-   em28xx_errdev("You may try to use card= insmod option to "
- 

[PATCH 01/25] [media] tuner-xc2028: mark printk continuation lines as such

2016-10-14 Thread Mauro Carvalho Chehab
This driver has a lot of printk continuation lines for
debugging purposes. Since commit 563873318d32
("Merge branch 'printk-cleanups"), this won't work as expected
anymore. So, let's add KERN_CONT to those lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/tuners/tuner-xc2028.c | 93 +++--
 1 file changed, 48 insertions(+), 45 deletions(-)

diff --git a/drivers/media/tuners/tuner-xc2028.c 
b/drivers/media/tuners/tuner-xc2028.c
index 317ef63ee789..55f6c858b9c3 100644
--- a/drivers/media/tuners/tuner-xc2028.c
+++ b/drivers/media/tuners/tuner-xc2028.c
@@ -179,67 +179,67 @@ static int xc2028_get_reg(struct xc2028_data *priv, u16 
reg, u16 *val)
 static void dump_firm_type_and_int_freq(unsigned int type, u16 int_freq)
 {
if (type & BASE)
-   printk("BASE ");
+   printk(KERN_CONT "BASE ");
if (type & INIT1)
-   printk("INIT1 ");
+   printk(KERN_CONT "INIT1 ");
if (type & F8MHZ)
-   printk("F8MHZ ");
+   printk(KERN_CONT "F8MHZ ");
if (type & MTS)
-   printk("MTS ");
+   printk(KERN_CONT "MTS ");
if (type & D2620)
-   printk("D2620 ");
+   printk(KERN_CONT "D2620 ");
if (type & D2633)
-   printk("D2633 ");
+   printk(KERN_CONT "D2633 ");
if (type & DTV6)
-   printk("DTV6 ");
+   printk(KERN_CONT "DTV6 ");
if (type & QAM)
-   printk("QAM ");
+   printk(KERN_CONT "QAM ");
if (type & DTV7)
-   printk("DTV7 ");
+   printk(KERN_CONT "DTV7 ");
if (type & DTV78)
-   printk("DTV78 ");
+   printk(KERN_CONT "DTV78 ");
if (type & DTV8)
-   printk("DTV8 ");
+   printk(KERN_CONT "DTV8 ");
if (type & FM)
-   printk("FM ");
+   printk(KERN_CONT "FM ");
if (type & INPUT1)
-   printk("INPUT1 ");
+   printk(KERN_CONT "INPUT1 ");
if (type & LCD)
-   printk("LCD ");
+   printk(KERN_CONT "LCD ");
if (type & NOGD)
-   printk("NOGD ");
+   printk(KERN_CONT "NOGD ");
if (type & MONO)
-   printk("MONO ");
+   printk(KERN_CONT "MONO ");
if (type & ATSC)
-   printk("ATSC ");
+   printk(KERN_CONT "ATSC ");
if (type & IF)
-   printk("IF ");
+   printk(KERN_CONT "IF ");
if (type & LG60)
-   printk("LG60 ");
+   printk(KERN_CONT "LG60 ");
if (type & ATI638)
-   printk("ATI638 ");
+   printk(KERN_CONT "ATI638 ");
if (type & OREN538)
-   printk("OREN538 ");
+   printk(KERN_CONT "OREN538 ");
if (type & OREN36)
-   printk("OREN36 ");
+   printk(KERN_CONT "OREN36 ");
if (type & TOYOTA388)
-   printk("TOYOTA388 ");
+   printk(KERN_CONT "TOYOTA388 ");
if (type & TOYOTA794)
-   printk("TOYOTA794 ");
+   printk(KERN_CONT "TOYOTA794 ");
if (type & DIBCOM52)
-   printk("DIBCOM52 ");
+   printk(KERN_CONT "DIBCOM52 ");
if (type & ZARLINK456)
-   printk("ZARLINK456 ");
+   printk(KERN_CONT "ZARLINK456 ");
if (type & CHINA)
-   printk("CHINA ");
+   printk(KERN_CONT "CHINA ");
if (type & F6MHZ)
-   printk("F6MHZ ");
+   printk(KERN_CONT "F6MHZ ");
if (type & INPUT2)
-   printk("INPUT2 ");
+   printk(KERN_CONT "INPUT2 ");
if (type & SCODE)
-   printk("SCODE ");
+   printk(KERN_CONT "SCODE ");
if (type & HAS_IF)
-   printk("HAS_IF_%d ", int_freq);
+   printk(KERN_CONT "HAS_IF_%d ", int_freq);
 }
 
 static  v4l2_std_id parse_audio_std_option(void)
@@ -374,8 +374,8 @@ static int load_all_firmwares(struct dvb_frontend *fe,
if (!size || size > endp - p) {
tuner_err("Firmware type ");
dump_firm_type(type);
-   printk("(%x), id %llx is corrupted "
-  "(size=%d, expected %d)\n",
+   printk(KERN_CONT
+  "(%x), id %llx is corrupted (size=%d, expected 
%d)\n",
   type, (unsigned long long)id,
   (unsigned)(endp - p), size);
goto corrupt;
@@ -390,7 +390,7 @@ static int load_all_firmwares(struct dvb_frontend *fe,
tuner_dbg("Reading firmware type ");
if (debug) {
dump_firm_type_and_int_freq(type, int_freq);
-   printk("(%x), id %llx, size=%d.\n",

[PATCH 04/25] [media] em28xx: mark printk continuation lines as such

2016-10-14 Thread Mauro Carvalho Chehab
This driver has a lot of printk continuation lines for
debugging purposes. Since commit 563873318d32
("Merge branch 'printk-cleanups"), this won't work as expected
anymore. So, let's add KERN_CONT to those lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/em28xx/em28xx-core.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-core.c 
b/drivers/media/usb/em28xx/em28xx-core.c
index a73e853e876e..06bee2d67273 100644
--- a/drivers/media/usb/em28xx/em28xx-core.c
+++ b/drivers/media/usb/em28xx/em28xx-core.c
@@ -102,7 +102,7 @@ int em28xx_read_reg_req_len(struct em28xx *dev, u8 req, u16 
reg,
  0x, reg, dev->urb_buf, len, HZ);
if (ret < 0) {
if (reg_debug)
-   printk(" failed!\n");
+   printk(KERN_CONT " failed!\n");
mutex_unlock(&dev->ctrl_urb_lock);
return usb_translate_errors(ret);
}
@@ -115,10 +115,10 @@ int em28xx_read_reg_req_len(struct em28xx *dev, u8 req, 
u16 reg,
if (reg_debug) {
int byte;
 
-   printk("<<<");
+   printk(KERN_CONT "<<<");
for (byte = 0; byte < len; byte++)
-   printk(" %02x", (unsigned char)buf[byte]);
-   printk("\n");
+   printk(KERN_CONT " %02x", (unsigned char)buf[byte]);
+   printk(KERN_CONT "\n");
}
 
return ret;
@@ -174,8 +174,8 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 
reg, char *buf,
len & 0xff, len >> 8);
 
for (byte = 0; byte < len; byte++)
-   printk(" %02x", (unsigned char)buf[byte]);
-   printk("\n");
+   printk(KERN_CONT " %02x", (unsigned char)buf[byte]);
+   printk(KERN_CONT "\n");
}
 
mutex_lock(&dev->ctrl_urb_lock);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 09/25] [media] tuner-core: use %&ph for small buffer dumps

2016-10-14 Thread Mauro Carvalho Chehab
This driver has a printk with a continuation lines for debugging purposes.
 Since commit 563873318d32 ("Merge branch 'printk-cleanups'"), this
won't work anymore. We might be using KERNEL_CONT, but it is better
to just use a single printk line using %*ph for buffer dump.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/v4l2-core/tuner-core.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/media/v4l2-core/tuner-core.c 
b/drivers/media/v4l2-core/tuner-core.c
index e2613ecb7605..d3a6236b6b02 100644
--- a/drivers/media/v4l2-core/tuner-core.c
+++ b/drivers/media/v4l2-core/tuner-core.c
@@ -617,14 +617,12 @@ static int tuner_probe(struct i2c_client *client,
 
if (show_i2c) {
unsigned char buffer[16];
-   int i, rc;
+   int rc;
 
memset(buffer, 0, sizeof(buffer));
rc = i2c_master_recv(client, buffer, sizeof(buffer));
-   tuner_info("I2C RECV = ");
-   for (i = 0; i < rc; i++)
-   printk(KERN_CONT "%02x ", buffer[i]);
-   printk("\n");
+   if (rc >= 0)
+   tuner_info("I2C RECV = %*ph\n", rc, buffer);
}
 
/* autodetection code based on the i2c addr */
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 02/25] [media] tuner-xc2028: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/tuners/tuner-xc2028.c | 23 +--
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/media/tuners/tuner-xc2028.c 
b/drivers/media/tuners/tuner-xc2028.c
index 55f6c858b9c3..e07c5fb59cc6 100644
--- a/drivers/media/tuners/tuner-xc2028.c
+++ b/drivers/media/tuners/tuner-xc2028.c
@@ -56,8 +56,7 @@ MODULE_PARM_DESC(no_poweroff, "0 (default) powers device off 
when not used.\n"
 static char audio_std[8];
 module_param_string(audio_std, audio_std, sizeof(audio_std), 0);
 MODULE_PARM_DESC(audio_std,
-   "Audio standard. XC3028 audio decoder explicitly "
-   "needs to know what audio\n"
+   "Audio standard. XC3028 audio decoder explicitly needs to know what 
audio\n"
"standard is needed for some video standards with audio A2 or NICAM.\n"
"The valid values are:\n"
"A2\n"
@@ -69,8 +68,8 @@ MODULE_PARM_DESC(audio_std,
 
 static char firmware_name[30];
 module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0);
-MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the "
-   "default firmware name\n");
+MODULE_PARM_DESC(firmware_name,
+"Firmware file name. Allows overriding the default firmware 
name\n");
 
 static LIST_HEAD(hybrid_tuner_instance_list);
 static DEFINE_MUTEX(xc2028_list_mutex);
@@ -346,8 +345,7 @@ static int load_all_firmwares(struct dvb_frontend *fe,
 
n++;
if (n >= n_array) {
-   tuner_err("More firmware images in file than "
- "were expected!\n");
+   tuner_err("More firmware images in file than were 
expected!\n");
goto corrupt;
}
 
@@ -496,8 +494,8 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned 
int type,
}
 
if (best_nr_matches > 0) {
-   tuner_dbg("Selecting best matching firmware (%d bits) for "
- "type=", best_nr_matches);
+   tuner_dbg("Selecting best matching firmware (%d bits) for 
type=",
+ best_nr_matches);
dump_firm_type(type);
printk(KERN_CONT
   "(%x), id %016llx:\n", type, (unsigned long long)*id);
@@ -840,8 +838,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned 
int type,
goto fail;
}
 
-   tuner_dbg("Device is Xceive %d version %d.%d, "
- "firmware version %d.%d\n",
+   tuner_dbg("Device is Xceive %d version %d.%d, firmware version %d.%d\n",
  hwmodel, (version & 0xf000) >> 12, (version & 0xf00) >> 8,
  (version & 0xf0) >> 4, version & 0xf);
 
@@ -855,8 +852,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned 
int type,
tuner_err("Incorrect readback of firmware version.\n");
goto fail;
} else {
-   tuner_err("Returned an incorrect version. However, "
- "read is not reliable enough. Ignoring 
it.\n");
+   tuner_err("Returned an incorrect version. However, read 
is not reliable enough. Ignoring it.\n");
hwmodel = 3028;
}
}
@@ -867,8 +863,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned 
int type,
priv->hwvers  = version & 0xff00;
} else if (priv->hwmodel == 0 || priv->hwmodel != hwmodel ||
   priv->hwvers != (version & 0xff00)) {
-   tuner_err("Read invalid device hardware information - tuner "
- "hung?\n");
+   tuner_err("Read invalid device hardware information - tuner 
hung?\n");
goto fail;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/25] Do some printk cleanups to avoid troubles with continuation lines

2016-10-14 Thread Mauro Carvalho Chehab
This commit:

commit 563873318d328d9bbab4b00dfd835ac7c7e28697
Merge: 24532f768121 bfd8d3f23b51
Author: Linus Torvalds 
Date:���Mon Oct 10 09:29:50 2016 -0700

Merge branch 'printk-cleanups'

Affects dmesg prints like:
printk(KERN_INFO "foo");
printk(" bar\n);

Won't be doing the same output, as the Kernel won't understand the second
printk as a continuation.

That's said, some media drivers use some very old driver-specific way
of outputting messages, that came before pr_foo() and dev_foo() started
being used at the subsystem.

This patch series start fixing those issues. I have another series of ~30-40
patches already, but they require more work, as they use dev_foo(), with
could potentially cause some regression, and touch on a lot of drivers.

They also depend on a big patch that merges big printk lines, that I also
want to split into smaller ones.

So, let me flush a series of cases that handle simpler cases. 

Mauro Carvalho Chehab (25):
  [media] tuner-xc2028: mark printk continuation lines as such
  [media] tuner-xc2028: don't break long lines
  [media] em28xx: don't break long lines
  [media] em28xx: mark printk continuation lines as such
  [media] em28xx: use pr_foo instead of em28xx-specific printk macros
  [media] em28xx: convert the remaining printks to pr_foo
  [media] dvb-core: don't break long lines
  [media] tuner-core: don't break long lines
  [media] tuner-core: use %&ph for small buffer dumps
  [media] radio-bcm2048: don't ignore errors
  [media] dvb-core: use pr_foo() instead of printk()
  [media] dvb_demux: convert an internal ifdef into a Kconfig option
  [media] dvb_demux: uncomment a packet loss check code
  [media] dvb-core: get rid of demux optional circular buffer
  [media] dvb-core: move dvb_filter out of the DVB core
  [media] dvb_filter: get rid of dead code
  [media] dvb_filter: use KERN_CONT where needed
  [media] uvc_driver: use KERN_CONT where needed
  [media] imon: use %*ph to do small hexa dumps
  [media] mt20xx: use %*ph to do small hexa dumps
  [media] tvaudio: mark printk continuation lines as such
  [media] flexcop-i2c: mark printk continuation lines as such
  [media] cx2341x: mark printk continuation lines as such
  [media] dvb-pll: use pr_foo() macros instead of printk()
  [media] nxt6000: use pr_foo() macros instead of printk()

 drivers/media/common/b2c2/flexcop-common.h |   1 -
 drivers/media/common/b2c2/flexcop-i2c.c|  10 +-
 drivers/media/common/cx2341x.c |  12 +-
 drivers/media/dvb-core/Kconfig |  13 +
 drivers/media/dvb-core/Makefile|   2 +-
 drivers/media/dvb-core/demux.h |   5 +-
 drivers/media/dvb-core/dmxdev.c|  28 +-
 drivers/media/dvb-core/dvb_ca_en50221.c|  57 +-
 drivers/media/dvb-core/dvb_demux.c | 115 ++--
 drivers/media/dvb-core/dvb_demux.h |   2 -
 drivers/media/dvb-core/dvb_filter.c| 603 -
 drivers/media/dvb-core/dvb_frontend.c  |  12 +-
 drivers/media/dvb-core/dvb_net.c   |  85 +--
 drivers/media/dvb-core/dvbdev.c|  25 +-
 drivers/media/dvb-frontends/dvb-pll.c  |  19 +-
 drivers/media/dvb-frontends/nxt6000.c  | 136 +++--
 drivers/media/i2c/tvaudio.c|   5 +-
 drivers/media/pci/ttpci/Makefile   |   2 +-
 drivers/media/pci/ttpci/dvb_filter.c   | 114 
 drivers/media/{dvb-core => pci/ttpci}/dvb_filter.h |   0
 drivers/media/rc/imon.c|   7 +-
 drivers/media/tuners/mt20xx.c  |  21 +-
 drivers/media/tuners/tuner-xc2028.c| 116 ++--
 drivers/media/usb/em28xx/em28xx-audio.c|  45 +-
 drivers/media/usb/em28xx/em28xx-camera.c   |  53 +-
 drivers/media/usb/em28xx/em28xx-cards.c| 153 +++---
 drivers/media/usb/em28xx/em28xx-core.c | 105 ++--
 drivers/media/usb/em28xx/em28xx-dvb.c  |  73 ++-
 drivers/media/usb/em28xx/em28xx-i2c.c  | 183 +++
 drivers/media/usb/em28xx/em28xx-input.c|  29 +-
 drivers/media/usb/em28xx/em28xx-vbi.c  |   7 +-
 drivers/media/usb/em28xx/em28xx-video.c| 105 ++--
 drivers/media/usb/em28xx/em28xx.h  |  18 +-
 drivers/media/usb/ttusb-dec/ttusb_dec.c|  58 +-
 drivers/media/usb/uvc/uvc_driver.c |  30 +-
 drivers/media/v4l2-core/tuner-core.c   |  15 +-
 drivers/staging/media/bcm2048/radio-bcm2048.c  |   2 +
 37 files changed, 896 insertions(+), 1370 deletions(-)
 delete mode 100644 drivers/media/dvb-core/dvb_filter.c
 create mode 100644 drivers/media/pci/ttpci/dvb_filter.c
 rename drivers/media/{dvb-core => pci/ttpci}/dvb_filter.h (100%)

-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a

[PATCH 22/25] [media] flexcop-i2c: mark printk continuation lines as such

2016-10-14 Thread Mauro Carvalho Chehab
This driver has printk continuation lines for debugging purposes.

Since commit 563873318d32 ("Merge branch 'printk-cleanups'"),
this won't work as expected anymore. So, let's add KERN_CONT to
those lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/common/b2c2/flexcop-i2c.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/common/b2c2/flexcop-i2c.c 
b/drivers/media/common/b2c2/flexcop-i2c.c
index 965d5eb33752..e41cd23f8e45 100644
--- a/drivers/media/common/b2c2/flexcop-i2c.c
+++ b/drivers/media/common/b2c2/flexcop-i2c.c
@@ -124,10 +124,10 @@ int flexcop_i2c_request(struct flexcop_i2c_adapter *i2c,
 #ifdef DUMP_I2C_MESSAGES
printk(KERN_DEBUG "%d ", i2c->port);
if (op == FC_READ)
-   printk("rd(");
+   printk(KERN_CONT "rd(");
else
-   printk("wr(");
-   printk("%02x): %02x ", chipaddr, addr);
+   printk(KERN_CONT "wr(");
+   printk(KERN_CONT "%02x): %02x ", chipaddr, addr);
 #endif
 
/* in that case addr is the only value ->
@@ -151,7 +151,7 @@ int flexcop_i2c_request(struct flexcop_i2c_adapter *i2c,
 
 #ifdef DUMP_I2C_MESSAGES
for (i = 0; i < bytes_to_transfer; i++)
-   printk("%02x ", buf[i]);
+   printk(KERN_CONT "%02x ", buf[i]);
 #endif
 
if (ret < 0)
@@ -163,7 +163,7 @@ int flexcop_i2c_request(struct flexcop_i2c_adapter *i2c,
}
 
 #ifdef DUMP_I2C_MESSAGES
-   printk("\n");
+   printk(KERN_CONT "\n");
 #endif
 
return 0;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 15/25] [media] dvb-core: move dvb_filter out of the DVB core

2016-10-14 Thread Mauro Carvalho Chehab
The dvb_filter.c can hardly be considered as part of the DVB
core. More than half of the code there is commented out by
av7110 and ttusb_dec.

On the latter, just two small helper functions and a struct
definition is used.

Being part of the core means that it would require an
amount of work to fix issues in it, like bad printk's
on it, and to document it on some future, like other kAPI
headers. It simply not worth the effort for something that
seems to be deprecated, as no new drivers use it.

So, move it out of the core, by moving it to pci/ttpci
directory, where av7110 driver is kept, and copy the two
routines used by ttyusb_dec directly into its code.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/common/b2c2/flexcop-common.h |  1 -
 drivers/media/dvb-core/Makefile|  2 +-
 drivers/media/pci/ttpci/Makefile   |  2 +-
 drivers/media/{dvb-core => pci/ttpci}/dvb_filter.c |  3 --
 drivers/media/{dvb-core => pci/ttpci}/dvb_filter.h |  0
 drivers/media/usb/ttusb-dec/ttusb_dec.c| 58 +-
 6 files changed, 59 insertions(+), 7 deletions(-)
 rename drivers/media/{dvb-core => pci/ttpci}/dvb_filter.c (99%)
 rename drivers/media/{dvb-core => pci/ttpci}/dvb_filter.h (100%)

diff --git a/drivers/media/common/b2c2/flexcop-common.h 
b/drivers/media/common/b2c2/flexcop-common.h
index 2b2460e9e6b4..2533574c0cf4 100644
--- a/drivers/media/common/b2c2/flexcop-common.h
+++ b/drivers/media/common/b2c2/flexcop-common.h
@@ -14,7 +14,6 @@
 
 #include "dmxdev.h"
 #include "dvb_demux.h"
-#include "dvb_filter.h"
 #include "dvb_net.h"
 #include "dvb_frontend.h"
 
diff --git a/drivers/media/dvb-core/Makefile b/drivers/media/dvb-core/Makefile
index 8f22bcd7c1f9..281bc89576e6 100644
--- a/drivers/media/dvb-core/Makefile
+++ b/drivers/media/dvb-core/Makefile
@@ -4,7 +4,7 @@
 
 dvb-net-$(CONFIG_DVB_NET) := dvb_net.o
 
-dvb-core-objs := dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o\
+dvb-core-objs := dvbdev.o dmxdev.o dvb_demux.o \
 dvb_ca_en50221.o dvb_frontend.o\
 $(dvb-net-y) dvb_ringbuffer.o dvb_math.o
 
diff --git a/drivers/media/pci/ttpci/Makefile b/drivers/media/pci/ttpci/Makefile
index 49f71b1eaf14..3cf617737f7c 100644
--- a/drivers/media/pci/ttpci/Makefile
+++ b/drivers/media/pci/ttpci/Makefile
@@ -3,7 +3,7 @@
 # and the AV7110 DVB device driver
 #
 
-dvb-ttpci-objs := av7110_hw.o av7110_v4l.o av7110_av.o av7110_ca.o av7110.o 
av7110_ipack.o
+dvb-ttpci-objs := av7110_hw.o av7110_v4l.o av7110_av.o av7110_ca.o av7110.o 
av7110_ipack.o dvb_filter.o
 
 ifdef CONFIG_DVB_AV7110_IR
 dvb-ttpci-objs += av7110_ir.o
diff --git a/drivers/media/dvb-core/dvb_filter.c 
b/drivers/media/pci/ttpci/dvb_filter.c
similarity index 99%
rename from drivers/media/dvb-core/dvb_filter.c
rename to drivers/media/pci/ttpci/dvb_filter.c
index 772003fb1821..6395812ed1f1 100644
--- a/drivers/media/dvb-core/dvb_filter.c
+++ b/drivers/media/pci/ttpci/dvb_filter.c
@@ -390,7 +390,6 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct 
dvb_audio_info *ai, int p
 
return 0;
 }
-EXPORT_SYMBOL(dvb_filter_get_ac3info);
 
 
 #if 0
@@ -565,7 +564,6 @@ void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, 
unsigned short pid,
p2ts->cb=cb;
p2ts->priv=priv;
 }
-EXPORT_SYMBOL(dvb_filter_pes2ts_init);
 
 int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
  int len, int payload_start)
@@ -600,4 +598,3 @@ int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, 
unsigned char *pes,
memcpy(buf+5+rest, pes, len);
return p2ts->cb(p2ts->priv, buf);
 }
-EXPORT_SYMBOL(dvb_filter_pes2ts);
diff --git a/drivers/media/dvb-core/dvb_filter.h 
b/drivers/media/pci/ttpci/dvb_filter.h
similarity index 100%
rename from drivers/media/dvb-core/dvb_filter.h
rename to drivers/media/pci/ttpci/dvb_filter.h
diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c 
b/drivers/media/usb/ttusb-dec/ttusb_dec.c
index 4e7671a3a1e4..35d5003ff809 100644
--- a/drivers/media/usb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c
@@ -36,7 +36,6 @@
 
 #include "dmxdev.h"
 #include "dvb_demux.h"
-#include "dvb_filter.h"
 #include "dvb_frontend.h"
 #include "dvb_net.h"
 #include "ttusbdecfe.h"
@@ -92,6 +91,15 @@ enum ttusb_dec_interface {
TTUSB_DEC_INTERFACE_OUT
 };
 
+typedef int (dvb_filter_pes2ts_cb_t) (void *, unsigned char *);
+
+struct dvb_filter_pes2ts {
+   unsigned char buf[188];
+   unsigned char cc;
+   dvb_filter_pes2ts_cb_t *cb;
+   void *priv;
+};
+
 struct ttusb_dec {
enum ttusb_dec_modelmodel;
char*model_name;
@@ -201,6 +209,54 @@ static u16 rc_keys[] = {
KEY_RADIO
 };
 
+static void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts,
+  unsigned short pid,
+  dvb_filter_pes2ts_cb_t *cb, void *priv)
+{

[PATCH 18/25] [media] uvc_driver: use KERN_CONT where needed

2016-10-14 Thread Mauro Carvalho Chehab
Some continuation messages are not using KERN_CONT.

Since commit 563873318d32 ("Merge branch 'printk-cleanups"),
this won't work as expected anymore. So, let's add KERN_CONT
to those lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/uvc/uvc_driver.c | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c 
b/drivers/media/usb/uvc/uvc_driver.c
index 302e284a95eb..9c4b56b4a9c6 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -1309,7 +1309,7 @@ static int uvc_scan_chain_entity(struct uvc_video_chain 
*chain,
switch (UVC_ENTITY_TYPE(entity)) {
case UVC_VC_EXTENSION_UNIT:
if (uvc_trace_param & UVC_TRACE_PROBE)
-   printk(" <- XU %d", entity->id);
+   printk(KERN_CONT " <- XU %d", entity->id);
 
if (entity->bNrInPins != 1) {
uvc_trace(UVC_TRACE_DESCR, "Extension unit %d has more "
@@ -1321,7 +1321,7 @@ static int uvc_scan_chain_entity(struct uvc_video_chain 
*chain,
 
case UVC_VC_PROCESSING_UNIT:
if (uvc_trace_param & UVC_TRACE_PROBE)
-   printk(" <- PU %d", entity->id);
+   printk(KERN_CONT " <- PU %d", entity->id);
 
if (chain->processing != NULL) {
uvc_trace(UVC_TRACE_DESCR, "Found multiple "
@@ -1334,7 +1334,7 @@ static int uvc_scan_chain_entity(struct uvc_video_chain 
*chain,
 
case UVC_VC_SELECTOR_UNIT:
if (uvc_trace_param & UVC_TRACE_PROBE)
-   printk(" <- SU %d", entity->id);
+   printk(KERN_CONT " <- SU %d", entity->id);
 
/* Single-input selector units are ignored. */
if (entity->bNrInPins == 1)
@@ -1353,7 +1353,7 @@ static int uvc_scan_chain_entity(struct uvc_video_chain 
*chain,
case UVC_ITT_CAMERA:
case UVC_ITT_MEDIA_TRANSPORT_INPUT:
if (uvc_trace_param & UVC_TRACE_PROBE)
-   printk(" <- IT %d\n", entity->id);
+   printk(KERN_CONT " <- IT %d\n", entity->id);
 
break;
 
@@ -1361,17 +1361,17 @@ static int uvc_scan_chain_entity(struct uvc_video_chain 
*chain,
case UVC_OTT_DISPLAY:
case UVC_OTT_MEDIA_TRANSPORT_OUTPUT:
if (uvc_trace_param & UVC_TRACE_PROBE)
-   printk(" OT %d", entity->id);
+   printk(KERN_CONT " OT %d", entity->id);
 
break;
 
case UVC_TT_STREAMING:
if (UVC_ENTITY_IS_ITERM(entity)) {
if (uvc_trace_param & UVC_TRACE_PROBE)
-   printk(" <- IT %d\n", entity->id);
+   printk(KERN_CONT " <- IT %d\n", entity->id);
} else {
if (uvc_trace_param & UVC_TRACE_PROBE)
-   printk(" OT %d", entity->id);
+   printk(KERN_CONT " OT %d", entity->id);
}
 
break;
@@ -1416,9 +1416,9 @@ static int uvc_scan_chain_forward(struct uvc_video_chain 
*chain,
list_add_tail(&forward->chain, &chain->entities);
if (uvc_trace_param & UVC_TRACE_PROBE) {
if (!found)
-   printk(" (->");
+   printk(KERN_CONT " (->");
 
-   printk(" XU %d", forward->id);
+   printk(KERN_CONT " XU %d", forward->id);
found = 1;
}
break;
@@ -1436,16 +1436,16 @@ static int uvc_scan_chain_forward(struct 
uvc_video_chain *chain,
list_add_tail(&forward->chain, &chain->entities);
if (uvc_trace_param & UVC_TRACE_PROBE) {
if (!found)
-   printk(" (->");
+   printk(KERN_CONT " (->");
 
-   printk(" OT %d", forward->id);
+   printk(KERN_CONT " OT %d", forward->id);
found = 1;
}
break;
}
}
if (found)
-   printk(")");
+   printk(KERN_CONT ")");
 
return 0;
 }
@@ -1471,7 +1471,7 @@ static int uvc_scan_chain_backward(struct uvc_video_chain 
*chain,
}
 
if (uvc_trace_param & UVC_TRACE_PROBE)
-   printk(" <- IT");
+   printk(KERN_CONT " <- IT");
 
chain->selector = entity;
for (i = 0; i < entity->bNrInPins; ++i) {
@@ -1485,14 +1485,14 @@ static int uvc_scan_chain_backward(struct 
uvc_v

[PATCH 07/25] [media] dvb-core: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/dvb-core/dvb_demux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/dvb-core/dvb_demux.c 
b/drivers/media/dvb-core/dvb_demux.c
index a0cf7b0d03e8..280716f1cc46 100644
--- a/drivers/media/dvb-core/dvb_demux.c
+++ b/drivers/media/dvb-core/dvb_demux.c
@@ -426,8 +426,7 @@ static void dvb_dmx_swfilter_packet(struct dvb_demux 
*demux, const u8 *buf)
}
 
if (buf[1] & 0x80) {
-   dprintk_tscheck("TEI detected. "
-   "PID=0x%x data1=0x%x\n",
+   dprintk_tscheck("TEI detected. PID=0x%x data1=0x%x\n",
pid, buf[1]);
/* data in this packet can't be trusted - drop it unless
 * module option dvb_demux_feed_err_pkts is set */
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 17/25] [media] dvb_filter: use KERN_CONT where needed

2016-10-14 Thread Mauro Carvalho Chehab
Some continuation messages are not using KERN_CONT.

Since commit 563873318d32 ("Merge branch 'printk-cleanups"),
this won't work as expected anymore. So, let's add KERN_CONT
to those lines.

While here, add missing log level annotations.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/ttpci/dvb_filter.c | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/media/pci/ttpci/dvb_filter.c 
b/drivers/media/pci/ttpci/dvb_filter.c
index 227f93e2ef10..b67127b67d4e 100644
--- a/drivers/media/pci/ttpci/dvb_filter.c
+++ b/drivers/media/pci/ttpci/dvb_filter.c
@@ -17,7 +17,6 @@ static u32 ac3_frames[3][32] =
  {96,120,144,168,192,240,288,336,384,480,576,672,768,960,1152,1344,
   1536,1728,1920,0,0,0,0,0,0,0,0,0,0,0,0,0}};
 
-
 int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int 
pr)
 {
u8 *headr;
@@ -38,7 +37,7 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct 
dvb_audio_info *ai, int p
 
if (!found) return -1;
if (pr)
-   printk("Audiostream: AC3");
+   printk(KERN_DEBUG "Audiostream: AC3");
 
ai->off = c;
if (c+5 >= count) return -1;
@@ -50,19 +49,19 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct 
dvb_audio_info *ai, int p
ai->bit_rate = ac3_bitrates[frame >> 1]*1000;
 
if (pr)
-   printk("  BRate: %d kb/s", (int) ai->bit_rate/1000);
+   printk(KERN_CONT "  BRate: %d kb/s", (int) ai->bit_rate/1000);
 
ai->frequency = (headr[2] & 0xc0 ) >> 6;
fr = (headr[2] & 0xc0 ) >> 6;
ai->frequency = freq[fr]*100;
-   if (pr) printk ("  Freq: %d Hz\n", (int) ai->frequency);
-
+   if (pr)
+   printk(KERN_CONT "  Freq: %d Hz\n", (int) ai->frequency);
 
ai->framesize = ac3_frames[fr][frame >> 1];
if ((frame & 1) &&  (fr == 1)) ai->framesize++;
ai->framesize = ai->framesize << 1;
-   if (pr) printk ("  Framesize %d\n",(int) ai->framesize);
-
+   if (pr)
+   printk(KERN_DEBUG "  Framesize %d\n", (int) ai->framesize);
 
return 0;
 }
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 14/25] [media] dvb-core: get rid of demux optional circular buffer

2016-10-14 Thread Mauro Carvalho Chehab
There is a provision at the dvb_demux.c to use a vmalloc'ed
circular buffer, enabled via an extra #ifdef option that it
is not at Kconfig. Enabling it will only make the Kernel to
allocate/deallocate such buffer, but no code would actually
use it. So, no practical effect, except for sparing some
memory without any good reason.

So, get rid of such dead code.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/dvb-core/demux.h |  5 +
 drivers/media/dvb-core/dmxdev.c|  4 ++--
 drivers/media/dvb-core/dvb_demux.c | 42 ++
 drivers/media/dvb-core/dvb_demux.h |  2 --
 drivers/media/dvb-core/dvb_net.c   |  3 +--
 5 files changed, 6 insertions(+), 50 deletions(-)

diff --git a/drivers/media/dvb-core/demux.h b/drivers/media/dvb-core/demux.h
index aeda2b64931c..f8adf4506a45 100644
--- a/drivers/media/dvb-core/demux.h
+++ b/drivers/media/dvb-core/demux.h
@@ -103,7 +103,6 @@ struct dmx_ts_feed {
   u16 pid,
   int type,
   enum dmx_ts_pes pes_type,
-  size_t circular_buffer_size,
   ktime_t timeout);
int (*start_filtering)(struct dmx_ts_feed *feed);
int (*stop_filtering)(struct dmx_ts_feed *feed);
@@ -181,7 +180,6 @@ struct dmx_section_feed {
/* public: */
int (*set)(struct dmx_section_feed *feed,
   u16 pid,
-  size_t circular_buffer_size,
   int check_crc);
int (*allocate_filter)(struct dmx_section_feed *feed,
   struct dmx_section_filter **filter);
@@ -206,8 +204,7 @@ struct dmx_section_feed {
  * the &dmx_demux.
  * Any TS packets that match the filter settings are copied to a circular
  * buffer. The filtered TS packets are delivered to the client using this
- * callback function. The size of the circular buffer is controlled by the
- * circular_buffer_size parameter of the &dmx_ts_feed.@set function.
+ * callback function.
  * It is expected that the @buffer1 and @buffer2 callback parameters point to
  * addresses within the circular buffer, but other implementations are also
  * possible. Note that the called party should not try to free the memory
diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c
index 1e96a6f1b6f0..efe55a3e80d0 100644
--- a/drivers/media/dvb-core/dmxdev.c
+++ b/drivers/media/dvb-core/dmxdev.c
@@ -595,7 +595,7 @@ static int dvb_dmxdev_start_feed(struct dmxdev *dmxdev,
tsfeed = feed->ts;
tsfeed->priv = filter;
 
-   ret = tsfeed->set(tsfeed, feed->pid, ts_type, ts_pes, 32768, timeout);
+   ret = tsfeed->set(tsfeed, feed->pid, ts_type, ts_pes, timeout);
if (ret < 0) {
dmxdev->demux->release_ts_feed(dmxdev->demux, tsfeed);
return ret;
@@ -666,7 +666,7 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter 
*filter)
return ret;
}
 
-   ret = (*secfeed)->set(*secfeed, para->pid, 32768,
+   ret = (*secfeed)->set(*secfeed, para->pid,
  (para->flags & DMX_CHECK_CRC) ? 1 
: 0);
if (ret < 0) {
pr_err("DVB (%s): could not set feed\n",
diff --git a/drivers/media/dvb-core/dvb_demux.c 
b/drivers/media/dvb-core/dvb_demux.c
index 51bf5eb2df49..3ad0b2cd26b1 100644
--- a/drivers/media/dvb-core/dvb_demux.c
+++ b/drivers/media/dvb-core/dvb_demux.c
@@ -36,8 +36,6 @@
 
 #include "dvb_demux.h"
 
-#define NOBUFS
-
 static int dvb_demux_tscheck;
 module_param(dvb_demux_tscheck, int, 0644);
 MODULE_PARM_DESC(dvb_demux_tscheck,
@@ -663,8 +661,7 @@ static void dvb_demux_feed_del(struct dvb_demux_feed *feed)
 }
 
 static int dmx_ts_feed_set(struct dmx_ts_feed *ts_feed, u16 pid, int ts_type,
-  enum dmx_ts_pes pes_type,
-  size_t circular_buffer_size, ktime_t timeout)
+  enum dmx_ts_pes pes_type, ktime_t timeout)
 {
struct dvb_demux_feed *feed = (struct dvb_demux_feed *)ts_feed;
struct dvb_demux *demux = feed->demux;
@@ -694,23 +691,10 @@ static int dmx_ts_feed_set(struct dmx_ts_feed *ts_feed, 
u16 pid, int ts_type,
dvb_demux_feed_add(feed);
 
feed->pid = pid;
-   feed->buffer_size = circular_buffer_size;
feed->timeout = timeout;
feed->ts_type = ts_type;
feed->pes_type = pes_type;
 
-   if (feed->buffer_size) {
-#ifdef NOBUFS
-   feed->buffer = NULL;
-#else
-   feed->buffer = vmalloc(feed->buffer_size);
-   if (!feed->buffer) {
-   mutex_unlock(&demux->mutex);
-   return -ENOMEM;
-   }
-#endif
-   }
-
feed->state = DMX_STATE_READY;
mutex_unlock(&demux->mutex);
 
@@ -799,7 +783,6 @@ static int dvbdmx_allocate_ts_feed(struct dmx_demux *dmx,
feed-

[PATCH 05/25] [media] em28xx: use pr_foo instead of em28xx-specific printk macros

2016-10-14 Thread Mauro Carvalho Chehab
There's no reason to keep using em28xx-specific printk macros
here. Just use pr_foo().

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/em28xx/em28xx-audio.c  |  31 -
 drivers/media/usb/em28xx/em28xx-camera.c |  34 +-
 drivers/media/usb/em28xx/em28xx-cards.c  |  77 +++---
 drivers/media/usb/em28xx/em28xx-core.c   |  51 +++
 drivers/media/usb/em28xx/em28xx-dvb.c|  42 ++--
 drivers/media/usb/em28xx/em28xx-i2c.c| 109 ---
 drivers/media/usb/em28xx/em28xx-input.c  |  26 
 drivers/media/usb/em28xx/em28xx-video.c  |  57 
 drivers/media/usb/em28xx/em28xx.h|  18 +
 9 files changed, 215 insertions(+), 230 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-audio.c 
b/drivers/media/usb/em28xx/em28xx-audio.c
index 2a3975b1aea5..b5f35a25d870 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -25,6 +25,8 @@
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include "em28xx.h"
+
 #include 
 #include 
 #include 
@@ -44,7 +46,6 @@
 #include 
 #include 
 #include 
-#include "em28xx.h"
 
 static int debug;
 module_param(debug, int, 0644);
@@ -164,7 +165,7 @@ static void em28xx_audio_isocirq(struct urb *urb)
 
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status < 0)
-   em28xx_errdev("resubmit of audio urb failed (error=%i)\n",
+   pr_err("resubmit of audio urb failed (error=%i)\n",
  status);
return;
 }
@@ -182,7 +183,7 @@ static int em28xx_init_audio_isoc(struct em28xx *dev)
 
errCode = usb_submit_urb(dev->adev.urb[i], GFP_ATOMIC);
if (errCode) {
-   em28xx_errdev("submit of audio urb failed (error=%i)\n",
+   pr_err("submit of audio urb failed (error=%i)\n",
  errCode);
em28xx_deinit_isoc_audio(dev);
atomic_set(&dev->adev.stream_started, 0);
@@ -254,7 +255,7 @@ static int snd_em28xx_capture_open(struct snd_pcm_substream 
*substream)
int nonblock, ret = 0;
 
if (!dev) {
-   em28xx_err("BUG: em28xx can't find device struct. Can't proceed 
with open\n");
+   pr_err("BUG: em28xx can't find device struct. Can't proceed 
with open\n");
return -ENODEV;
}
 
@@ -317,7 +318,7 @@ static int snd_em28xx_capture_open(struct snd_pcm_substream 
*substream)
 err:
mutex_unlock(&dev->lock);
 
-   em28xx_err("Error while configuring em28xx mixer\n");
+   pr_err("Error while configuring em28xx mixer\n");
return ret;
 }
 
@@ -755,7 +756,7 @@ static int em28xx_audio_urb_init(struct em28xx *dev)
intf = usb_ifnum_to_if(dev->udev, dev->ifnum);
 
if (intf->num_altsetting <= alt) {
-   em28xx_errdev("alt %d doesn't exist on interface %d\n",
+   pr_err("alt %d doesn't exist on interface %d\n",
  dev->ifnum, alt);
return -ENODEV;
}
@@ -771,14 +772,14 @@ static int em28xx_audio_urb_init(struct em28xx *dev)
}
 
if (!ep) {
-   em28xx_errdev("Couldn't find an audio endpoint");
+   pr_err("Couldn't find an audio endpoint");
return -ENODEV;
}
 
ep_size = em28xx_audio_ep_packet_size(dev->udev, ep);
interval = 1 << (ep->bInterval - 1);
 
-   em28xx_info("Endpoint 0x%02x %s on intf %d alt %d interval = %d, size 
%d\n",
+   pr_info("Endpoint 0x%02x %s on intf %d alt %d interval = %d, size %d\n",
EM28XX_EP_AUDIO, usb_speed_string(dev->udev->speed),
 dev->ifnum, alt,
 interval,
@@ -819,7 +820,7 @@ static int em28xx_audio_urb_init(struct em28xx *dev)
if (urb_size > ep_size * npackets)
npackets = DIV_ROUND_UP(urb_size, ep_size);
 
-   em28xx_info("Number of URBs: %d, with %d packets and %d size\n",
+   pr_info("Number of URBs: %d, with %d packets and %d size\n",
num_urb, npackets, urb_size);
 
/* Estimate the bytes per period */
@@ -857,7 +858,7 @@ static int em28xx_audio_urb_init(struct em28xx *dev)
buf = usb_alloc_coherent(dev->udev, npackets * ep_size, 
GFP_ATOMIC,
 &urb->transfer_dma);
if (!buf) {
-   em28xx_errdev("usb_alloc_coherent failed!\n");
+   pr_err("usb_alloc_coherent failed!\n");
em28xx_audio_free_urb(dev);
return -ENOMEM;
}
@@ -897,7 +898,7 @@ static int em28xx_audio_init(struct em28xx *dev)
return 0;
}
 
-   em28xx_info("Binding audio extension\n");
+   pr_info("Binding audio extension\n");
 
kref_get(&dev->ref);
 
@

[PATCH 23/25] [media] cx2341x: mark printk continuation lines as such

2016-10-14 Thread Mauro Carvalho Chehab
This driver has printk continuation lines for debugging purposes.

Since commit 563873318d32 ("Merge branch 'printk-cleanups'"),
this won't work as expected anymore. So, let's add KERN_CONT to
those lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/common/cx2341x.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/media/common/cx2341x.c b/drivers/media/common/cx2341x.c
index 5e4afa0131e6..2725702eda7b 100644
--- a/drivers/media/common/cx2341x.c
+++ b/drivers/media/common/cx2341x.c
@@ -1190,8 +1190,8 @@ void cx2341x_log_status(const struct cx2341x_mpeg_params 
*p, const char *prefix)
prefix,
cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_TYPE));
if (p->stream_insert_nav_packets)
-   printk(" (with navigation packets)");
-   printk("\n");
+   printk(KERN_CONT " (with navigation packets)");
+   printk(KERN_CONT "\n");
printk(KERN_INFO "%s: VBI Format: %s\n",
prefix,
cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_VBI_FMT));
@@ -1209,8 +1209,8 @@ void cx2341x_log_status(const struct cx2341x_mpeg_params 
*p, const char *prefix)
cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_BITRATE_MODE),
p->video_bitrate);
if (p->video_bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR)
-   printk(", Peak %d", p->video_bitrate_peak);
-   printk("\n");
+   printk(KERN_CONT ", Peak %d", p->video_bitrate_peak);
+   printk(KERN_CONT "\n");
printk(KERN_INFO
"%s: Video:  GOP Size %d, %d B-Frames, %sGOP Closure\n",
prefix,
@@ -1232,9 +1232,9 @@ void cx2341x_log_status(const struct cx2341x_mpeg_params 
*p, const char *prefix)
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_MODE),
p->audio_mute ? " (muted)" : "");
if (p->audio_mode == V4L2_MPEG_AUDIO_MODE_JOINT_STEREO)
-   printk(", %s", cx2341x_menu_item(p,
+   printk(KERN_CONT ", %s", cx2341x_menu_item(p,
V4L2_CID_MPEG_AUDIO_MODE_EXTENSION));
-   printk(", %s, %s\n",
+   printk(KERN_CONT ", %s, %s\n",
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_EMPHASIS),
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_CRC));
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 25/25] [media] nxt6000: use pr_foo() macros instead of printk()

2016-10-14 Thread Mauro Carvalho Chehab
Replace printk() macros by their pr_foo() counterparts and
use pr_cont() for the continuation lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/dvb-frontends/nxt6000.c | 136 +++---
 1 file changed, 76 insertions(+), 60 deletions(-)

diff --git a/drivers/media/dvb-frontends/nxt6000.c 
b/drivers/media/dvb-frontends/nxt6000.c
index 73f9505367ac..1545d898b125 100644
--- a/drivers/media/dvb-frontends/nxt6000.c
+++ b/drivers/media/dvb-frontends/nxt6000.c
@@ -19,6 +19,8 @@
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include 
 #include 
 #include 
@@ -39,7 +41,11 @@ struct nxt6000_state {
 };
 
 static int debug;
-#define dprintk if (debug) printk
+#define dprintk(fmt, arg...) do {  \
+   if (debug)  \
+   printk(KERN_DEBUG pr_fmt("%s: " fmt),   \
+  __func__, ##arg);\
+} while (0)
 
 static int nxt6000_writereg(struct nxt6000_state* state, u8 reg, u8 data)
 {
@@ -215,119 +221,129 @@ static void nxt6000_dump_status(struct nxt6000_state 
*state)
 {
u8 val;
 
-/*
-   printk("RS_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, RS_COR_STAT));
-   printk("VIT_SYNC_STATUS: 0x%02X\n", nxt6000_readreg(fe, 
VIT_SYNC_STATUS));
-   printk("OFDM_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_COR_STAT));
-   printk("OFDM_SYR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_SYR_STAT));
-   printk("OFDM_TPS_RCVD_1: 0x%02X\n", nxt6000_readreg(fe, 
OFDM_TPS_RCVD_1));
-   printk("OFDM_TPS_RCVD_2: 0x%02X\n", nxt6000_readreg(fe, 
OFDM_TPS_RCVD_2));
-   printk("OFDM_TPS_RCVD_3: 0x%02X\n", nxt6000_readreg(fe, 
OFDM_TPS_RCVD_3));
-   printk("OFDM_TPS_RCVD_4: 0x%02X\n", nxt6000_readreg(fe, 
OFDM_TPS_RCVD_4));
-   printk("OFDM_TPS_RESERVED_1: 0x%02X\n", nxt6000_readreg(fe, 
OFDM_TPS_RESERVED_1));
-   printk("OFDM_TPS_RESERVED_2: 0x%02X\n", nxt6000_readreg(fe, 
OFDM_TPS_RESERVED_2));
-*/
-   printk("NXT6000 status:");
+#if 0
+   pr_info("RS_COR_STAT: 0x%02X\n",
+   nxt6000_readreg(fe, RS_COR_STAT));
+   pr_info("VIT_SYNC_STATUS: 0x%02X\n",
+   nxt6000_readreg(fe, VIT_SYNC_STATUS));
+   pr_info("OFDM_COR_STAT: 0x%02X\n",
+   nxt6000_readreg(fe, OFDM_COR_STAT));
+   pr_info("OFDM_SYR_STAT: 0x%02X\n",
+   nxt6000_readreg(fe, OFDM_SYR_STAT));
+   pr_info("OFDM_TPS_RCVD_1: 0x%02X\n",
+   nxt6000_readreg(fe, OFDM_TPS_RCVD_1));
+   pr_info("OFDM_TPS_RCVD_2: 0x%02X\n",
+   nxt6000_readreg(fe, OFDM_TPS_RCVD_2));
+   pr_info("OFDM_TPS_RCVD_3: 0x%02X\n",
+   nxt6000_readreg(fe, OFDM_TPS_RCVD_3));
+   pr_info("OFDM_TPS_RCVD_4: 0x%02X\n",
+   nxt6000_readreg(fe, OFDM_TPS_RCVD_4));
+   pr_info("OFDM_TPS_RESERVED_1: 0x%02X\n",
+   nxt6000_readreg(fe, OFDM_TPS_RESERVED_1));
+   pr_info("OFDM_TPS_RESERVED_2: 0x%02X\n",
+   nxt6000_readreg(fe, OFDM_TPS_RESERVED_2));
+#endif
+   pr_info("NXT6000 status:");
 
val = nxt6000_readreg(state, RS_COR_STAT);
 
-   printk(" DATA DESCR LOCK: %d,", val & 0x01);
-   printk(" DATA SYNC LOCK: %d,", (val >> 1) & 0x01);
+   pr_cont(" DATA DESCR LOCK: %d,", val & 0x01);
+   pr_cont(" DATA SYNC LOCK: %d,", (val >> 1) & 0x01);
 
val = nxt6000_readreg(state, VIT_SYNC_STATUS);
 
-   printk(" VITERBI LOCK: %d,", (val >> 7) & 0x01);
+   pr_cont(" VITERBI LOCK: %d,", (val >> 7) & 0x01);
 
switch ((val >> 4) & 0x07) {
 
case 0x00:
-   printk(" VITERBI CODERATE: 1/2,");
+   pr_cont(" VITERBI CODERATE: 1/2,");
break;
 
case 0x01:
-   printk(" VITERBI CODERATE: 2/3,");
+   pr_cont(" VITERBI CODERATE: 2/3,");
break;
 
case 0x02:
-   printk(" VITERBI CODERATE: 3/4,");
+   pr_cont(" VITERBI CODERATE: 3/4,");
break;
 
case 0x03:
-   printk(" VITERBI CODERATE: 5/6,");
+   pr_cont(" VITERBI CODERATE: 5/6,");
break;
 
case 0x04:
-   printk(" VITERBI CODERATE: 7/8,");
+   pr_cont(" VITERBI CODERATE: 7/8,");
break;
 
default:
-   printk(" VITERBI CODERATE: Reserved,");
+   pr_cont(" VITERBI CODERATE: Reserved,");
 
}
 
val = nxt6000_readreg(state, OFDM_COR_STAT);
 
-   printk(" CHCTrack: %d,", (val >> 7) & 0x01);
-   printk(" TPSLock: %d,", (val >> 6) & 0x01);
-   printk(" SYRLock: %d,", (val >> 5) & 0x01);
-   printk(" AGCLock: %d,", (val >> 4) & 0x01);
+   pr_cont(" CHCTrack: %d,", (val >> 7) & 0x01);
+   pr_cont(" TPSLock: %d,", (val >> 6) & 0x01);
+   pr_cont(" SYRLock: %d,", (val >> 5) & 0x01);
+   

[PATCH 08/25] [media] tuner-core: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
Due to the 80-cols checkpatch warnings, several strings
were broken into multiple lines. This is not considered
a good practice anymore, as it makes harder to grep for
strings at the source code. So, join those continuation
lines.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/v4l2-core/tuner-core.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/media/v4l2-core/tuner-core.c 
b/drivers/media/v4l2-core/tuner-core.c
index 731487be5baa..e2613ecb7605 100644
--- a/drivers/media/v4l2-core/tuner-core.c
+++ b/drivers/media/v4l2-core/tuner-core.c
@@ -503,8 +503,7 @@ static int tuner_s_type_addr(struct v4l2_subdev *sd,
set_type(c, tun_setup->type, tun_setup->mode_mask,
 tun_setup->config, tun_setup->tuner_callback);
} else
-   tuner_dbg("set addr discarded for type %i, mask %x. "
- "Asked to change tuner at addr 0x%02x, with mask 
%x\n",
+   tuner_dbg("set addr discarded for type %i, mask %x. Asked to 
change tuner at addr 0x%02x, with mask %x\n",
  t->type, t->mode_mask,
  tun_setup->addr, tun_setup->mode_mask);
 
@@ -809,8 +808,8 @@ static int set_mode(struct tuner *t, enum v4l2_tuner_type 
mode)
 
if (mode != t->mode) {
if (check_mode(t, mode) == -EINVAL) {
-   tuner_dbg("Tuner doesn't support mode %d. "
- "Putting tuner to sleep\n", mode);
+   tuner_dbg("Tuner doesn't support mode %d. Putting tuner 
to sleep\n",
+ mode);
t->standby = true;
if (analog_ops->standby)
analog_ops->standby(&t->fe);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 15/21] ARM: dts: nitrogen6x: Add dtsi for BD_HDMI_MIPI HDMI to MIPI CSI-2 receiver board

2016-10-14 Thread Philipp Zabel
Add device tree nodes for the BD_HDMI_MIPI HDMI to MIPI CSI-2 receiver
board with a TC358743 connected to the Nitrogen6X MIPI CSI-2 input
connector.

Signed-off-by: Philipp Zabel 
---
 .../boot/dts/imx6qdl-nitrogen6x-bd-hdmi-mipi.dtsi  | 73 ++
 1 file changed, 73 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx6qdl-nitrogen6x-bd-hdmi-mipi.dtsi

diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x-bd-hdmi-mipi.dtsi 
b/arch/arm/boot/dts/imx6qdl-nitrogen6x-bd-hdmi-mipi.dtsi
new file mode 100644
index 000..e110874
--- /dev/null
+++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x-bd-hdmi-mipi.dtsi
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2015 Philipp Zabel, Pengutronix
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+#include 
+#include 
+
+/ {
+   hdmi_osc: hdmi-osc {
+   compatible = "fixed-clock";
+   clock-output-names = "hdmi-osc";
+   clock-frequency = <2700>;
+   #clock-cells = <0>;
+   };
+};
+
+&i2c2 {
+   tc358743: tc358743@0f {
+   compatible = "toshiba,tc358743";
+   pinctrl-names = "default";
+   pinctrl-0 = <&pinctrl_tc358743>;
+   reg = <0x0f>;
+   clocks = <&hdmi_osc>;
+   clock-names = "refclk";
+   reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>;
+   interrupt-parent = <&gpio2>;
+   interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
+
+   port@0 {
+   tc358743_out: endpoint {
+   remote-endpoint = <&mipi_csi2_in>;
+   data-lanes = <1 2 3 4>;
+   clock-lanes = <0>;
+   clock-noncontinuous;
+   link-frequencies = /bits/ 64 <29700>;
+   };
+   };
+   };
+};
+
+&iomuxc {
+   pinctrl-names = "default";
+   pinctrl-0 = <&pinctrl_hog>;
+
+   imx6q-nitrogen6x-tc358743 {
+   pinctrl_tc358743: tc358743grp {
+   fsl,pins = <
+   MX6QDL_PAD_NANDF_WP_B__GPIO6_IO09 0x4000b0b0
/* RESETN */
+   MX6QDL_PAD_NANDF_D5__GPIO2_IO05   0x400130b0
/* INT */
+   >;
+   };
+   };
+};
+
+&mipi_csi {
+   status = "okay";
+
+   port@0 {
+   mipi_csi2_in: endpoint {
+   remote-endpoint = <&tc358743_out>;
+   data-lanes = <1 2 3 4>;
+   clock-lanes = <0>;
+   clock-noncontinuous;
+   link-frequencies = /bits/ 64 <29700>;
+   };
+   };
+};
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 20/21] [media] imx: Set i.MX MIPI CSI-2 entity function to bridge

2016-10-14 Thread Philipp Zabel
The i.MX6 MIPI CSI2 bridge converts the external MIPI CSI2 input into
a SoC internal parallel bus connected to the IPU CSIs via the CSI2IPU
gasket.

Signed-off-by: Philipp Zabel 
---
 drivers/media/platform/imx/imx-mipi-csi2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/imx/imx-mipi-csi2.c 
b/drivers/media/platform/imx/imx-mipi-csi2.c
index 7b289cc..6b00a67 100644
--- a/drivers/media/platform/imx/imx-mipi-csi2.c
+++ b/drivers/media/platform/imx/imx-mipi-csi2.c
@@ -606,6 +606,7 @@ static int mipi_csi2_probe(struct platform_device *pdev)
csi2->pads[2].flags = MEDIA_PAD_FL_SOURCE;
csi2->pads[3].flags = MEDIA_PAD_FL_SOURCE;
csi2->pads[4].flags = MEDIA_PAD_FL_SOURCE;
+   csi2->subdev.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
ret = media_entity_pads_init(&csi2->subdev.entity, MIPI_CSI2_PADS,
csi2->pads);
if (ret < 0)
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 19/21] [media] video-multiplexer: set entity function to mux

2016-10-14 Thread Philipp Zabel
Signed-off-by: Philipp Zabel 
---
 drivers/media/platform/video-multiplexer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/video-multiplexer.c 
b/drivers/media/platform/video-multiplexer.c
index f79b90e..466d9d0 100644
--- a/drivers/media/platform/video-multiplexer.c
+++ b/drivers/media/platform/video-multiplexer.c
@@ -138,6 +138,7 @@ static int vidsw_async_init(struct vidsw *vidsw, struct 
device_node *node)
vidsw->pads[i].flags = MEDIA_PAD_FL_SINK;
vidsw->pads[numports - 1].flags = MEDIA_PAD_FL_SOURCE;
 
+   vidsw->subdev.entity.function = MEDIA_ENT_F_MUX;
ret = media_entity_pads_init(&vidsw->subdev.entity, numports,
 vidsw->pads);
if (ret < 0)
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 21/21] [media] tc358743: set entity function to video interface bridge

2016-10-14 Thread Philipp Zabel
The TC358743 is an HDMI to MIPI CSI2-2 bridge.

Signed-off-by: Philipp Zabel 
---
 drivers/media/i2c/tc358743.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 7f82932..259ccf6 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -1886,6 +1886,7 @@ static int tc358743_probe(struct i2c_client *client,
}
 
state->pad.flags = MEDIA_PAD_FL_SOURCE;
+   sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
err = media_entity_pads_init(&sd->entity, 1, &state->pad);
if (err < 0)
goto err_hdl;
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 18/21] [media] add mux and video interface bridge entity functions

2016-10-14 Thread Philipp Zabel
Signed-off-by: Philipp Zabel 
---
 Documentation/media/uapi/mediactl/media-types.rst | 22 ++
 include/uapi/linux/media.h|  6 ++
 2 files changed, 28 insertions(+)

diff --git a/Documentation/media/uapi/mediactl/media-types.rst 
b/Documentation/media/uapi/mediactl/media-types.rst
index 3e03dc2..023be29 100644
--- a/Documentation/media/uapi/mediactl/media-types.rst
+++ b/Documentation/media/uapi/mediactl/media-types.rst
@@ -298,6 +298,28 @@ Types and flags used to represent the media graph elements
  received on its sink pad and outputs the statistics data on
  its source pad.
 
+-  ..  row 29
+
+   ..  _MEDIA-ENT-F-MUX:
+
+   -  ``MEDIA_ENT_F_MUX``
+
+   - Video multiplexer. An entity capable of multiplexing must have at
+ least two sink pads and one source pad, and must pass the video
+ frame(s) received from the active sink pad to the source pad. Video
+ frame(s) from the inactive sink pads are discarded.
+
+-  ..  row 30
+
+   ..  _MEDIA-ENT-F-VID-IF-BRIDGE:
+
+   -  ``MEDIA_ENT_F_VID_IF_BRIDGE``
+
+   - Video interface bridge. A video interface bridge entity must have at
+ least one sink pad and one source pad. It receives video frame(s) on
+ its sink pad in one bus format (HDMI, eDP, MIPI CSI-2, ...) and
+ converts them and outputs them on its source pad in another bus format
+ (eDP, MIPI CSI-2, parallel, ...).
 
 ..  tabularcolumns:: |p{5.5cm}|p{12.0cm}|
 
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 4890787..08a8bfa 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -105,6 +105,12 @@ struct media_device_info {
 #define MEDIA_ENT_F_PROC_VIDEO_STATISTICS  (MEDIA_ENT_F_BASE + 0x4006)
 
 /*
+ * Switch and bridge entitites
+ */
+#define MEDIA_ENT_F_MUX(MEDIA_ENT_F_BASE + 
0x5001)
+#define MEDIA_ENT_F_VID_IF_BRIDGE  (MEDIA_ENT_F_BASE + 0x5002)
+
+/*
  * Connectors
  */
 /* It is a responsibility of the entity drivers to add connectors and links */
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 16/21] gpu: ipuv3: add ipu_csi_set_downsize

2016-10-14 Thread Philipp Zabel
Support downsizing to 1/2 width and/or height in the CSI.

Signed-off-by: Philipp Zabel 
---
 drivers/gpu/ipu-v3/ipu-csi.c | 16 
 include/video/imx-ipu-v3.h   |  1 +
 2 files changed, 17 insertions(+)

diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c
index 06631ac..77f172e 100644
--- a/drivers/gpu/ipu-v3/ipu-csi.c
+++ b/drivers/gpu/ipu-v3/ipu-csi.c
@@ -527,6 +527,22 @@ void ipu_csi_set_window(struct ipu_csi *csi, struct 
v4l2_rect *w)
 }
 EXPORT_SYMBOL_GPL(ipu_csi_set_window);
 
+void ipu_csi_set_downsize(struct ipu_csi *csi, bool horiz, bool vert)
+{
+   unsigned long flags;
+   u32 reg;
+
+   spin_lock_irqsave(&csi->lock, flags);
+
+   reg = ipu_csi_read(csi, CSI_OUT_FRM_CTRL);
+   reg &= ~(CSI_HORI_DOWNSIZE_EN | CSI_VERT_DOWNSIZE_EN);
+   reg |= (horiz ? CSI_HORI_DOWNSIZE_EN : 0) |
+  (vert ? CSI_VERT_DOWNSIZE_EN : 0);
+   ipu_csi_write(csi, reg, CSI_OUT_FRM_CTRL);
+
+   spin_unlock_irqrestore(&csi->lock, flags);
+}
+
 void ipu_csi_set_test_generator(struct ipu_csi *csi, bool active,
u32 r_value, u32 g_value, u32 b_value,
u32 pix_clk)
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
index 7adeaae0..5f2f26d 100644
--- a/include/video/imx-ipu-v3.h
+++ b/include/video/imx-ipu-v3.h
@@ -271,6 +271,7 @@ int ipu_csi_init_interface(struct ipu_csi *csi,
 bool ipu_csi_is_interlaced(struct ipu_csi *csi);
 void ipu_csi_get_window(struct ipu_csi *csi, struct v4l2_rect *w);
 void ipu_csi_set_window(struct ipu_csi *csi, struct v4l2_rect *w);
+void ipu_csi_set_downsize(struct ipu_csi *csi, bool horiz, bool vert);
 void ipu_csi_set_test_generator(struct ipu_csi *csi, bool active,
u32 r_value, u32 g_value, u32 b_value,
u32 pix_clk);
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 14/21] ARM: dts: imx6qdl: Add MIPI CSI-2 D-PHY compatible and clocks

2016-10-14 Thread Philipp Zabel
>From the data sheets it is not quite clear what the clock inputs should
be named, but freescale code calls them "dphy_clk" (would that be per?)
and "pixel_clk" and connects them to the mipi_core_cfg and emi_podf
clocks, respectively.  The mipi_core_cfg control is called hsi_tx
currently, but it really gates a whole lot of other clocks, too.

Signed-off-by: Philipp Zabel 
---
 arch/arm/boot/dts/imx6qdl.dtsi | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index cd325bd..2be6de4 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -1123,9 +1123,16 @@
};
 
mipi_csi: mipi@021dc000 {
+   compatible = "fsl,imx6q-mipi-csi2", 
"dw-mipi-csi2";
reg = <0x021dc000 0x4000>;
+   clocks = <&clks IMX6QDL_CLK_HSI_TX>,/* 
mipi_core_cfg/ipg_clk_root */
+<&clks IMX6QDL_CLK_HSI_TX>,/* 
mipi_core_cfg/video_27m_clk_root */
+<&clks IMX6QDL_CLK_HSI_TX>,/* 
mipi_core_cfg/video_27m_clk_root */
+<&clks IMX6QDL_CLK_EIM_PODF>;  /* 
shoid be ipu1_ipu_hsp_clk_root on S/DL, axi_clk_root on D/Q */
+   clock-names = "pclk", "cfg", "ref", "pixel";
#address-cells = <1>;
#size-cells = <0>;
+   status = "disabled";
};
 
mipi_dsi: mipi@021e {
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 00/21] Basic i.MX IPUv3 capture support

2016-10-14 Thread Philipp Zabel
Hi,

the second round removes the prepare_stream callback and instead lets the
intermediate subdevices propagate s_stream calls to their sources rather
than individually calling s_stream on each subdevice from the bridge driver.
This is similar to how drm bridges recursively call into their next neighbor.
It makes it easier to do bringup ordering on a per-link level, as long as the
source preparation can be done at s_power, and the sink can just prepare, call
s_stream on its source, and then enable itself inside s_stream. Obviously this
would only work in a generic fashion if all asynchronous subdevices with both
inputs and outputs would propagate s_stream to their source subdevices.

Changes since v1:
 - Propagate field and colorspace in ipucsi_subdev_set_format.
 - Remove v4l2_media_subdev_prepare_stream and v4l2_media_subdev_s_stream,
   let subdevices propagate s_stream calls to their upstream subdevices
   themselves.
 - Various fixes (see individual patches for details)

regards
Philipp

Philipp Zabel (20):
  [media] v4l2-async: move code out of v4l2_async_notifier_register into
v4l2_async_test_nofity_all
  [media] v4l2-async: allow subdevices to add further subdevices to the
notifier waiting list
  [media] v4l: of: add v4l2_of_subdev_registered
  [media] v4l2-async: add new subdevices to the tail of subdev_list
  [media] imx: Add i.MX SoC wide media device driver
  [media] imx-ipu: Add i.MX IPUv3 CSI subdevice driver
  [media] imx: Add i.MX IPUv3 capture driver
  [media] platform: add video-multiplexer subdevice driver
  [media] imx: Add i.MX MIPI CSI-2 subdevice driver
  [media] tc358743: put lanes in STOP state before starting streaming
  ARM: dts: imx6qdl: Add capture-subsystem node
  ARM: dts: imx6qdl: Add mipi_ipu1/2 multiplexers, mipi_csi, and their
connections
  ARM: dts: imx6qdl: Add MIPI CSI-2 D-PHY compatible and clocks
  ARM: dts: nitrogen6x: Add dtsi for BD_HDMI_MIPI HDMI to MIPI CSI-2
receiver board
  gpu: ipuv3: add ipu_csi_set_downsize
  [media] imx-ipuv3-csi: support downsizing
  [media] add mux and video interface bridge entity functions
  [media] video-multiplexer: set entity function to mux
  [media] imx: Set i.MX MIPI CSI-2 entity function to bridge
  [media] tc358743: set entity function to video interface bridge

Sascha Hauer (1):
  [media] imx: Add IPUv3 media common code

 .../devicetree/bindings/media/fsl-imx-capture.txt  |   92 ++
 .../bindings/media/video-multiplexer.txt   |   59 ++
 Documentation/media/uapi/mediactl/media-types.rst  |   22 +
 arch/arm/boot/dts/imx6dl.dtsi  |  187 
 arch/arm/boot/dts/imx6q.dtsi   |  123 +++
 .../boot/dts/imx6qdl-nitrogen6x-bd-hdmi-mipi.dtsi  |   73 ++
 arch/arm/boot/dts/imx6qdl.dtsi |   17 +-
 drivers/gpu/ipu-v3/ipu-csi.c   |   16 +
 drivers/media/i2c/tc358743.c   |5 +
 drivers/media/platform/Kconfig |   10 +
 drivers/media/platform/Makefile|3 +
 drivers/media/platform/imx/Kconfig |   33 +
 drivers/media/platform/imx/Makefile|5 +
 drivers/media/platform/imx/imx-ipu-capture.c   | 1015 
 drivers/media/platform/imx/imx-ipu.c   |  321 +++
 drivers/media/platform/imx/imx-ipu.h   |   43 +
 drivers/media/platform/imx/imx-ipuv3-csi.c |  578 +++
 drivers/media/platform/imx/imx-media.c |  249 +
 drivers/media/platform/imx/imx-mipi-csi2.c |  698 ++
 drivers/media/platform/video-multiplexer.c |  473 +
 drivers/media/v4l2-core/v4l2-async.c   |  102 +-
 drivers/media/v4l2-core/v4l2-of.c  |   69 ++
 include/media/v4l2-async.h |   12 +
 include/media/v4l2-of.h|   15 +
 include/uapi/linux/media.h |6 +
 include/video/imx-ipu-v3.h |1 +
 26 files changed, 4214 insertions(+), 13 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/fsl-imx-capture.txt
 create mode 100644 
Documentation/devicetree/bindings/media/video-multiplexer.txt
 create mode 100644 arch/arm/boot/dts/imx6qdl-nitrogen6x-bd-hdmi-mipi.dtsi
 create mode 100644 drivers/media/platform/imx/Kconfig
 create mode 100644 drivers/media/platform/imx/Makefile
 create mode 100644 drivers/media/platform/imx/imx-ipu-capture.c
 create mode 100644 drivers/media/platform/imx/imx-ipu.c
 create mode 100644 drivers/media/platform/imx/imx-ipu.h
 create mode 100644 drivers/media/platform/imx/imx-ipuv3-csi.c
 create mode 100644 drivers/media/platform/imx/imx-media.c
 create mode 100644 drivers/media/platform/imx/imx-mipi-csi2.c
 create mode 100644 drivers/media/platform/video-multiplexer.c

-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majord

[PATCH v2 05/21] [media] imx: Add i.MX SoC wide media device driver

2016-10-14 Thread Philipp Zabel
This driver registers a single, SoC wide media device, which all entities
in the media graph can be registered to. It is probed from device tree
using a capture-subsystem node, listing the IPUv3 input ports, similarly
to the already existing display-subsystem node that lists the IPUv3 output
ports.

Signed-off-by: Philipp Zabel 
---
 .../devicetree/bindings/media/fsl-imx-capture.txt  |  25 +++
 drivers/media/platform/Kconfig |   2 +
 drivers/media/platform/Makefile|   1 +
 drivers/media/platform/imx/Kconfig |   7 +
 drivers/media/platform/imx/Makefile|   1 +
 drivers/media/platform/imx/imx-media.c | 249 +
 6 files changed, 285 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/fsl-imx-capture.txt
 create mode 100644 drivers/media/platform/imx/Kconfig
 create mode 100644 drivers/media/platform/imx/Makefile
 create mode 100644 drivers/media/platform/imx/imx-media.c

diff --git a/Documentation/devicetree/bindings/media/fsl-imx-capture.txt 
b/Documentation/devicetree/bindings/media/fsl-imx-capture.txt
new file mode 100644
index 000..5805331
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/fsl-imx-capture.txt
@@ -0,0 +1,25 @@
+Freescale i.MX IPUv3 capture subsystem
+==
+
+The i.MX5/6 IPUv3 capture subsystem consists of one or two IPUs and all
+external subdevices connected to the IPU CSI input ports. On i.MX5 these
+are only external subdevices. On i.MX6, there are additional SoC internal
+multiplexers and a MIPI CSI-2 bridge connected to the CSI input ports via
+of_graph bindings.
+
+On i.MX6 variants with two IPUs, either a single capture subsystem node may be
+defined, containing all CSI ports, or two separate capture subsystem nodes may
+be defined, each containing the CSI ports of a single IPU. In the latter case
+there must be no external of_graph links between the two subsystems.
+
+Required properties:
+- compatible: should be "fsl,imx-capture-subsystem"
+- ports: should contain a list of phandles pointing to the capture interface
+  ports of IPU devices
+
+Example:
+
+capture-subsystem {
+compatible = "fsl,imx-capture-subsystem";
+ports = <&ipu1_csi0>, <&ipu1_csi1>, <&ipu2_csi0>, <&ipu2_csi1>;
+};
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index ce4a96f..105bf57 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -29,6 +29,8 @@ config VIDEO_VIA_CAMERA
 
 source "drivers/media/platform/davinci/Kconfig"
 
+source "drivers/media/platform/imx/Kconfig"
+
 source "drivers/media/platform/omap/Kconfig"
 
 source "drivers/media/platform/blackfin/Kconfig"
diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile
index 40b18d1..f7f9008 100644
--- a/drivers/media/platform/Makefile
+++ b/drivers/media/platform/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_VIDEO_RENESAS_FCP)   += rcar-fcp.o
 obj-$(CONFIG_VIDEO_RENESAS_JPU)+= rcar_jpu.o
 obj-$(CONFIG_VIDEO_RENESAS_VSP1)   += vsp1/
 
+obj-y  += imx/
 obj-y  += omap/
 
 obj-$(CONFIG_VIDEO_AM437X_VPFE)+= am437x/
diff --git a/drivers/media/platform/imx/Kconfig 
b/drivers/media/platform/imx/Kconfig
new file mode 100644
index 000..3bd699c
--- /dev/null
+++ b/drivers/media/platform/imx/Kconfig
@@ -0,0 +1,7 @@
+config MEDIA_IMX
+   tristate "Multimedia Support for Freescale i.MX"
+   depends on MEDIA_CONTROLLER
+   default y if IMX_IPUV3_CORE
+   ---help---
+ This driver provides a SoC wide media controller device that all
+ multimedia components in i.MX5 and i.MX6 SoCs can register with.
diff --git a/drivers/media/platform/imx/Makefile 
b/drivers/media/platform/imx/Makefile
new file mode 100644
index 000..74bed76
--- /dev/null
+++ b/drivers/media/platform/imx/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_MEDIA_IMX)+= imx-media.o
diff --git a/drivers/media/platform/imx/imx-media.c 
b/drivers/media/platform/imx/imx-media.c
new file mode 100644
index 000..1f1fab4
--- /dev/null
+++ b/drivers/media/platform/imx/imx-media.c
@@ -0,0 +1,249 @@
+/*
+ * i.MX V4L2 Capture Driver
+ *
+ * Copyright (C) 2016, Pengutronix, Philipp Zabel 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define IMX_MEDIA_MAX_PORTS4
+
+struct imx_media {
+   struct media_device mdev;
+   struct v4l2_device v4l2_dev;
+   struct v4l2_async_notifier subdev_notifier;
+   struct v4l2_async_subdev subdevs[IMX_MEDIA_MAX_PORTS];
+};
+
+static int v4l2_of_create_pad_link(struct v4l2_subdev *sd,
+  struct v4l2_of_link *link)
+{

[PATCH v2 10/21] [media] imx: Add i.MX MIPI CSI-2 subdevice driver

2016-10-14 Thread Philipp Zabel
Add a v4l2 subdevice driver for the Synopsys DesignWare MIPI CSI-2 host
controller on i.MX6. Here its output is connected to the CSI2IPU gasket,
which distributes the time division multiplexed virtual channels to the
four IPU CSI inputs, directly or through video bus multiplexers.

Signed-off-by: Philipp Zabel 
---
Changes since v1:
 - Call mipi_csi2_prepare_stream from mipi_csi2_s_stream and propagate
   s_stream to MIPI CSI-2 transmitter in the correct order.
---
 .../devicetree/bindings/media/fsl-imx-capture.txt  |  67 ++
 drivers/media/platform/imx/Kconfig |   7 +
 drivers/media/platform/imx/Makefile|   1 +
 drivers/media/platform/imx/imx-mipi-csi2.c | 697 +
 4 files changed, 772 insertions(+)
 create mode 100644 drivers/media/platform/imx/imx-mipi-csi2.c

diff --git a/Documentation/devicetree/bindings/media/fsl-imx-capture.txt 
b/Documentation/devicetree/bindings/media/fsl-imx-capture.txt
index 5805331..b5ef101 100644
--- a/Documentation/devicetree/bindings/media/fsl-imx-capture.txt
+++ b/Documentation/devicetree/bindings/media/fsl-imx-capture.txt
@@ -23,3 +23,70 @@ capture-subsystem {
 compatible = "fsl,imx-capture-subsystem";
 ports = <&ipu1_csi0>, <&ipu1_csi1>, <&ipu2_csi0>, <&ipu2_csi1>;
 };
+
+i.MX MIPI CSI-2 Host Controller
+===
+
+The i.MX6 contains an implementation of a Synopsys DesignWare MIPI CSI-2 host
+controller combined with a CSI2IPU gasket that distributes the virtual channels
+to up to four IPUv3 CSIs.
+
+Required properties:
+- compatible: should be "fsl,imx6q-mipi-csi2", "snps,dw-mipi-csi2"
+- reg: should be register base and length as documented in the SoC
+  reference manual
+- clocks: should contain the pclk, cfg, ref, and pixel clocks, in the
+  order determined by the clock-names property.
+- clock-names: should be "pclk", "cfg", "ref", "pixel"
+- address-cells: should be 1
+- size-cells: should be 0
+- port@*: five port nodes using of_graph bindings, one input port and four
+  output ports corresponding to the virtual channels.
+
+Example:
+
+mipi_csi: mipi@021dc000 {
+   compatible = "fsl,imx6q-mipi-csi2", "snps,dw-mipi-csi2";
+   reg = <0x021dc000 0x4000>;
+   clocks = <&clks IMX6QDL_CLK_HSI_TX>, <&clks IMX6QDL_CLK_HSI_TX>,
+<&clks IMX6QDL_CLK_HSI_TX>, <&clks IMX6QDL_CLK_EIM_PODF>;
+   clock-names = "pclk", "cfg", "ref", "pixel";
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   };
+
+   port@1 {
+   reg = <1>;
+
+   vc0: endpoint {
+   remote-endpoint = <&csi0_in>;
+   };
+   };
+
+   port@2 {
+   reg = <2>;
+
+   vc1: endpoint {
+   remote-endpoint = <&csi1_in>;
+   };
+   };
+
+   port@3 {
+   reg = <3>;
+
+   vc2: endpoint {
+   remote-endpoint = <&csi2_in>;
+   };
+   };
+
+   port@4 {
+   reg = <4>;
+
+   vc3: endpoint {
+   remote-endpoint = <&csi3_in>;
+   };
+   };
+};
diff --git a/drivers/media/platform/imx/Kconfig 
b/drivers/media/platform/imx/Kconfig
index 69e8648..db04e64 100644
--- a/drivers/media/platform/imx/Kconfig
+++ b/drivers/media/platform/imx/Kconfig
@@ -6,6 +6,13 @@ config MEDIA_IMX
  This driver provides a SoC wide media controller device that all
  multimedia components in i.MX5 and i.MX6 SoCs can register with.
 
+config MEDIA_IMX_MIPI_CSI2
+   tristate "i.MX MIPI CSI-2 Host Controller"
+   depends on VIDEO_V4L2_SUBDEV_API
+   help
+ This driver provides support for the MIPI CSI-2 Host Controller that
+ is connected to the IPU CSI input multiplexers on i.MX6 SoCs.
+
 config VIDEO_IMX_IPU_COMMON
tristate
 
diff --git a/drivers/media/platform/imx/Makefile 
b/drivers/media/platform/imx/Makefile
index 919eaa1..22d86fd 100644
--- a/drivers/media/platform/imx/Makefile
+++ b/drivers/media/platform/imx/Makefile
@@ -1,4 +1,5 @@
 obj-$(CONFIG_MEDIA_IMX)+= imx-media.o
+obj-$(CONFIG_MEDIA_IMX_MIPI_CSI2)  += imx-mipi-csi2.o
 obj-$(CONFIG_VIDEO_IMX_IPU_COMMON) += imx-ipu.o
 obj-$(CONFIG_VIDEO_IMX_IPU_CAPTURE)+= imx-ipu-capture.o
 obj-$(CONFIG_VIDEO_IMX_IPU_CSI)+= imx-ipuv3-csi.o
diff --git a/drivers/media/platform/imx/imx-mipi-csi2.c 
b/drivers/media/platform/imx/imx-mipi-csi2.c
new file mode 100644
index 000..7b289cc
--- /dev/null
+++ b/drivers/media/platform/imx/imx-mipi-csi2.c
@@ -0,0 +1,697 @@
+/*
+ * i.MX MIPI CSI-2 Host Controller driver
+ *
+ * Copyright (C) 2016, Pengutronix, Philipp Zabel 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include 
+#inclu

  1   2   >