Re: [PATCH v3.16 0/2] V4L2 event subscription fixes

2018-11-09 Thread Ben Hutchings
On Thu, 2018-11-08 at 14:03 +0200, Sakari Ailus wrote:
> Hi Ben,
> 
> The two patches fix a use-after-free issue in V4L2 event handling. The
> first patch that fixes that issue is already in the other stable trees (as
> well as Linus's tree) whereas the second that fixes a bug in the first
> one, is in the media tree only as of yet.

Thanks.  I'll apply the first now and hold the second until the
corresponding commit gets into Linus's tree.

Ben.

> https://git.linuxtv.org/media_tree.git/commit/?id=92539d3eda2c090b382699bbb896d4b54e9bdece>
> 
> Sakari Ailus (2):
>   v4l: event: Prevent freeing event subscriptions while accessed
>   v4l: event: Add subscription to list before calling "add" operation
> 
>  drivers/media/v4l2-core/v4l2-event.c | 63 
> 
>  drivers/media/v4l2-core/v4l2-fh.c|  2 ++
>  include/media/v4l2-fh.h  |  1 +
>  3 files changed, 38 insertions(+), 28 deletions(-)
> 
-- 
Ben Hutchings
Knowledge is power.  France is bacon.




signature.asc
Description: This is a digitally signed message part


Re: [PATCH] Documentation/media: uapi: Explicitly say there are no Invariant Sections

2018-09-06 Thread Ben Hutchings
Are you still waiting for agreement from any contributors, or is this
ready to apply?

Ben.

On Fri, 2018-08-03 at 15:41 +0100, Ben Hutchings wrote:
> The GNU Free Documentation License allows for a work to specify
> Invariant Sections that are not allowed to be modified.  (Debian
> considers that this makes such works non-free.)
> 
> The Linux Media Infrastructure userspace API documentation does not
> specify any such sections, but it also doesn't say there are none (as
> is recommended by the license text).  Make it explicit that there are
> none.
> 
> References: https://bugs.debian.org/698668
> Signed-off-by: Ben Hutchings 
> ---
>  Documentation/media/media_uapi.rst | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/media/media_uapi.rst 
> b/Documentation/media/media_uapi.rst
> index 28eb35a1f965..5198ff24a094 100644
> --- a/Documentation/media/media_uapi.rst
> +++ b/Documentation/media/media_uapi.rst
> @@ -10,9 +10,9 @@ Linux Media Infrastructure userspace API
>  
>  Permission is granted to copy, distribute and/or modify this document
>  under the terms of the GNU Free Documentation License, Version 1.1 or
> -any later version published by the Free Software Foundation. A copy of
> -the license is included in the chapter entitled "GNU Free Documentation
> -License".
> +any later version published by the Free Software Foundation, with no
> +Invariant Sections. A copy of the license is included in the chapter
> +entitled "GNU Free Documentation License".
>  
>  .. only:: html
>  
-- 
Ben Hutchings
I'm always amazed by the number of people who take up solipsism because
they heard someone else explain it. - E*Borg on alt.fan.pratchett




signature.asc
Description: This is a digitally signed message part


[PATCH] Documentation/media: uapi: Explicitly say there are no Invariant Sections

2018-08-03 Thread Ben Hutchings
The GNU Free Documentation License allows for a work to specify
Invariant Sections that are not allowed to be modified.  (Debian
considers that this makes such works non-free.)

The Linux Media Infrastructure userspace API documentation does not
specify any such sections, but it also doesn't say there are none (as
is recommended by the license text).  Make it explicit that there are
none.

References: https://bugs.debian.org/698668
Signed-off-by: Ben Hutchings 
---
 Documentation/media/media_uapi.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/media/media_uapi.rst 
b/Documentation/media/media_uapi.rst
index 28eb35a1f965..5198ff24a094 100644
--- a/Documentation/media/media_uapi.rst
+++ b/Documentation/media/media_uapi.rst
@@ -10,9 +10,9 @@ Linux Media Infrastructure userspace API
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
-any later version published by the Free Software Foundation. A copy of
-the license is included in the chapter entitled "GNU Free Documentation
-License".
+any later version published by the Free Software Foundation, with no
+Invariant Sections. A copy of the license is included in the chapter
+entitled "GNU Free Documentation License".
 
 .. only:: html
 


signature.asc
Description: Digital signature


Re: [PATCH for v3.2 00/12] v4l2-compat-ioctl32.c: remove set_fs(KERNEL_DS)

2018-02-27 Thread Ben Hutchings
On Wed, 2018-02-14 at 13:03 +0100, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verk...@cisco.com>
> 
> This patch series fixes a number of bugs and culminates in the removal
> of the set_fs(KERNEL_DS) call in v4l2-compat-ioctl32.c.
> 
> This was tested with a VM running 3.2, the vivi driver (a poor substitute for
> the much improved vivid driver that's available in later kernels, but it's the
> best I had) since that emulates the more common V4L2 ioctls that need to pass
> through v4l2-compat-ioctl32.c) and the 32-bit v4l2-compliance + 32-bit 
> v4l2-ctl
> utilities that together exercised the most common ioctls.
> 
> Most of the v4l2-compat-ioctl32.c do cleanups and fix subtle issues that
> v4l2-compliance complained about. The purpose is to 1) make it easy to
> verify that the final patch didn't introduce errors by first eliminating
> errors caused by other known bugs, and 2) keep the final patch at least
> somewhat readable.

Thanks, I've queued up all of these.  Again, I rebased these on top
of some earlier fixes to v4l2-compat-ioctl32.c which you incorporated
into your backports.

Ben.

> Regards,
> 
>   Hans
> 
> Daniel Mentz (2):
>   media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha
>   media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic
> 
> Hans Verkuil (10):
>   media: v4l2-ioctl.c: don't copy back the result for -ENOTTY
>   media: v4l2-compat-ioctl32.c: add missing VIDIOC_PREPARE_BUF
>   media: v4l2-compat-ioctl32.c: fix the indentation
>   media: v4l2-compat-ioctl32.c: move 'helper' functions to
> __get/put_v4l2_format32
>   media: v4l2-compat-ioctl32.c: avoid sizeof(type)
>   media: v4l2-compat-ioctl32.c: copy m.userptr in put_v4l2_plane32
>   media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer
>   media: v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32
>   media: v4l2-compat-ioctl32.c: drop pr_info for unknown buffer type
>   media: v4l2-compat-ioctl32.c: don't copy back the result for certain
> errors
> 
>  drivers/media/video/Makefile  |   7 +-
>  drivers/media/video/v4l2-compat-ioctl32.c | 966 
> ++++++
>  drivers/media/video/v4l2-ioctl.c  |   6 +-
>  3 files changed, 597 insertions(+), 382 deletions(-)
> 
-- 
Ben Hutchings
If the facts do not conform to your theory, they must be disposed of.



signature.asc
Description: This is a digitally signed message part


Re: [PATCH for v3.16 00/14] v4l2-compat-ioctl32.c: remove set_fs(KERNEL_DS)

2018-02-27 Thread Ben Hutchings
On Wed, 2018-02-14 at 12:59 +0100, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verk...@cisco.com>
> 
> This patch series fixes a number of bugs and culminates in the removal
> of the set_fs(KERNEL_DS) call in v4l2-compat-ioctl32.c.
> 
> This was tested with a VM running 3.16, the vivi driver (a poor substitute for
> the much improved vivid driver that's available in later kernels, but it's the
> best I had) since that emulates the more common V4L2 ioctls that need to pass
> through v4l2-compat-ioctl32.c) and the 32-bit v4l2-compliance + 32-bit 
> v4l2-ctl
> utilities that together exercised the most common ioctls.
> 
> Most of the v4l2-compat-ioctl32.c do cleanups and fix subtle issues that
> v4l2-compliance complained about. The purpose is to 1) make it easy to
> verify that the final patch didn't introduce errors by first eliminating
> errors caused by other known bugs, and 2) keep the final patch at least
> somewhat readable.
> 
> While compiling the media drivers for 3.16 I also came across a bug
> introduced in the 3.16 stable series that caused a compile error in the
> adv7604 driver. That's fixed in the first patch. Call it a bonus patch :-)

Thanks, I've queued up all of these.  However, I rebased these on top
of some earlier fixes to v4l2-compat-ioctl32.c which you incorporated
into your backports.

Ben.

-- 
Ben Hutchings
If the facts do not conform to your theory, they must be disposed of.



signature.asc
Description: This is a digitally signed message part


Re: [PATCH 1/1] s2255drv: f2255usb: firmware version 1.2.8

2017-11-22 Thread Ben Hutchings
On Fri, 2017-11-03 at 13:33 -0700, Dean Anderson wrote:
> Updates the firmware for the s2255drv driver.
> Adds support for NTSC4.43, horizontal/vertical adjustments and
> Motion JPEG capture mode improvements.
> 
> Signed-off-by: Dean Anderson <d...@sensoray.com>
> ---
>  f2255usb.bin | Bin 180776 -> 181312 bytes
>  1 file changed, 0 insertions(+), 0 deletions(-)
[...]

Applied, thanks.

Ben.

-- 
Ben Hutchings
When in doubt, use brute force. - Ken Thompson



signature.asc
Description: This is a digitally signed message part


Re: [PATCH] v4l2-dv-timings.h: fix polarity for 4k formats

2017-10-08 Thread Ben Hutchings
On Mon, 2016-05-02 at 10:11 +0200, Hans Verkuil wrote:
> Backport to 3.16-4.0 of mainline commit 
> 3020ca711871fdaf0c15c8bab677a6bc302e28fe
> 
> The VSync polarity was negative instead of positive for the 4k CEA formats.
> I probably copy-and-pasted these from the DMT 4k format, which does have a
> negative VSync polarity.
> 
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> Reported-by: Martin Bugge <marbu...@cisco.com>
> Signed-off-by: Mauro Carvalho Chehab <mche...@osg.samsung.com>
[...]

I've belatedly queued this up for 3.16.

Ben.

-- 
Ben Hutchings
compatible: Gracefully accepts erroneous data from any source



signature.asc
Description: This is a digitally signed message part


Re: [PATCH 4.4 058/103] [media] ttusb2: limit messages to buffer size

2017-06-02 Thread Ben Hutchings
[Dropped cc to stable and LKML.]

On Tue, 2017-05-23 at 22:09 +0200, Greg Kroah-Hartman wrote:
> 4.4-stable review patch.  If anyone has any objections, please let me know.
> 
> --
> 
> From: Alyssa Milburn <amilb...@zall.org>
> 
> commit a12b8ab8c5ff7ccd7b107a564743507c850a441d upstream.
> 
> Otherwise ttusb2_i2c_xfer can read or write beyond the end of static and
> heap buffers.

This function has another problem: it uses per-device mutexes to guard
access to static buffers.  This only works as long as there's a single
device.  It should be using per-device buffers (or a static mutex, but
that's less good).

Ben.

> Signed-off-by: Alyssa Milburn <amilb...@zall.org>
> Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com>
> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
> 
> ---
>  drivers/media/usb/dvb-usb/ttusb2.c |   19 +++
>  1 file changed, 19 insertions(+)
> 
> --- a/drivers/media/usb/dvb-usb/ttusb2.c
> +++ b/drivers/media/usb/dvb-usb/ttusb2.c
> @@ -78,6 +78,9 @@ static int ttusb2_msg(struct dvb_usb_dev
>   u8 *s, *r = NULL;
>   int ret = 0;
>  
> + if (4 + rlen > 64)
> + return -EIO;
> +
>   s = kzalloc(wlen+4, GFP_KERNEL);
>   if (!s)
>   return -ENOMEM;
> @@ -381,6 +384,22 @@ static int ttusb2_i2c_xfer(struct i2c_ad
>   write_read = i+1 < num && (msg[i+1].flags & I2C_M_RD);
>   read = msg[i].flags & I2C_M_RD;
>  
> + if (3 + msg[i].len > sizeof(obuf)) {
> + err("i2c wr len=%d too high", msg[i].len);
> + break;
> + }
> + if (write_read) {
> + if (3 + msg[i+1].len > sizeof(ibuf)) {
> + err("i2c rd len=%d too high", msg[i+1].len);
> + break;
> + }
> + } else if (read) {
> + if (3 + msg[i].len > sizeof(ibuf)) {
> + err("i2c rd len=%d too high", msg[i].len);
> +         break;
> + }
> + }
> +
>   obuf[0] = (msg[i].addr << 1) | (write_read | read);
>   if (read)
>   obuf[1] = 0;
> 
> 
> 

-- 
Ben Hutchings
Software Developer, Codethink Ltd.




[PATCH] [media] dvb-usb-dibusb-mc-common: Add MODULE_LICENSE

2017-02-17 Thread Ben Hutchings
dvb-usb-dibusb-mc-common is licensed under GPLv2, and if we don't say
so then it won't even load since it needs a GPL-only symbol.

Reported-by: Dominique Dumont <d...@debian.org>
References: https://bugs.debian.org/853110
Cc: sta...@vger.kernel.org # 4.9+
Fixes: e91455a1495a ("[media] dvb-usb: split out common parts of dibusb")
Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
 drivers/media/usb/dvb-usb/dibusb-mc-common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/usb/dvb-usb/dibusb-mc-common.c 
b/drivers/media/usb/dvb-usb/dibusb-mc-common.c
index c989cac9343d..0c2bc97436d5 100644
--- a/drivers/media/usb/dvb-usb/dibusb-mc-common.c
+++ b/drivers/media/usb/dvb-usb/dibusb-mc-common.c
@@ -11,6 +11,8 @@
 
 #include "dibusb.h"
 
+MODULE_LICENSE("GPL");
+
 /* 3000MC/P stuff */
 // Config Adjacent channels  Perf -cal22
 static struct dibx000_agc_config dib3000p_mt2060_agc_config = {


signature.asc
Description: Digital signature


Re: [PATCH 2/4] WHENCE: use https://linuxtv.org for LinuxTV URLs

2015-12-06 Thread Ben Hutchings
On Fri, 2015-12-04 at 10:46 -0200, Mauro Carvalho Chehab wrote:
> While https was always supported on linuxtv.org, only in
> Dec 3 2015 the website is using valid certificates.
> 
> As we're planning to drop pure http support on some
> future, change the http://linuxtv.org references at firmware/WHENCE
> file to point to https://linuxtv.org instead.

I've made the corresponding change in the linux-firmware.git
repository.  I don't know who, if anyone, maintains the firmware
subdirectory now.

Ben.

> Signed-off-by: Mauro Carvalho Chehab <mche...@osg.samsung.com>
> ---
>  firmware/WHENCE | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/firmware/WHENCE b/firmware/WHENCE
> index 0c4d96dee9b6..de6f22e008f1 100644
> --- a/firmware/WHENCE
> +++ b/firmware/WHENCE
> @@ -677,7 +677,7 @@ File: av7110/bootcode.bin
>  
>  Licence: GPLv2 or later
>  
> -ARM assembly source code available at 
> http://www.linuxtv.org/downloads/firmware/Boot.S
> +ARM assembly source code available at 
> https://linuxtv.org/downloads/firmware/Boot.S
>  
>  ----------
>  
-- 
Ben Hutchings
Theory and practice are closer in theory than in practice.
- John Levine, moderator of comp.compilers

signature.asc
Description: This is a digitally signed message part


Re: [Linux-kernel] [PATCH 13/20] media: soc_camera: v4l2-compliance fixes for querycap

2015-05-28 Thread Ben Hutchings
On Thu, 2015-05-21 at 13:46 +0100, Rob Taylor wrote:
 On 21/05/15 06:58, Hans Verkuil wrote:
  On 05/20/2015 06:39 PM, William Towle wrote:
  Fill in bus_info field and zero reserved field.
 
  Signed-off-by: Rob Taylor rob.tay...@codethink.co.uk
  Reviewed-by: William Towle william.to...@codethink.co.uk
  ---
   drivers/media/platform/soc_camera/soc_camera.c |2 ++
   1 file changed, 2 insertions(+)
 
  diff --git a/drivers/media/platform/soc_camera/soc_camera.c 
  b/drivers/media/platform/soc_camera/soc_camera.c
  index fd7497e..583c5e6 100644
  --- a/drivers/media/platform/soc_camera/soc_camera.c
  +++ b/drivers/media/platform/soc_camera/soc_camera.c
  @@ -954,6 +954,8 @@ static int soc_camera_querycap(struct file *file, void 
   *priv,
 WARN_ON(priv != file-private_data);
   
 strlcpy(cap-driver, ici-drv_name, sizeof(cap-driver));
  +  strlcpy(cap-bus_info, platform:soc_camera, sizeof(cap-bus_info));
  +  memset(cap-reserved, 0, sizeof(cap-reserved));
  
  Why the memset? That shouldn't be needed.
 
 v4l2-complience complained it wasn't zero (v4l2-compliance.cpp:308 in
 v4l-utils v1.6.2 [1])

I'm puzzled by that.  Isn't this function called by v4l_querycap(),
which is called by video_usercopy()?  And video_usercopy() zeroes the
entire structure before doing so, or at least it appears to be intended
to.

Anyway, if we're failing to initialise kernel memory that's copied to
user-space, that's a (usually minor) security issue and the fix ought to
be cc'd to stable.

Ben.


--
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: [RFC PATCH 5/5] media: rcar_vin: move buffer management to .stop_streaming handler

2015-01-19 Thread Ben Hutchings
On Sun, 2015-01-18 at 22:23 +0100, Guennadi Liakhovetski wrote:
 On Thu, 18 Dec 2014, Ben Hutchings wrote:
 
  From: William Towle william.to...@codethink.co.uk
  
  Move the buffer state test in the .buf_cleanup handler into
  .stop_streaming so that a) the vb2_queue API is not subverted, and
  b) tracking of active-state buffers via priv-queue_buf[] is handled
  as early as is possible
 
 Huh... Sorry, patches 1, 2, 3, and 5 of this series look like a strange 
 way to get from the present state to the destination. They all have to be 
 merged IMHO. 
[...]

Well, I thought that too.  Will's submission from last week has that
change:
http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/87009

Ben.


--
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


[RFC PATCH 0/5] media: rcar_vin: Fixes for buffer management

2014-12-18 Thread Ben Hutchings
This is a re-submission of patches previously sent and archived at
http://thread.gmane.org/gmane.linux.ports.sh.devel/37184/.  Will has
rebased onto 3.18 and added a further patch to address Hans' review
comments.

The driver continues to works for single frame capture, and no longer
provokes a WARNing.  However, video capture has regressed (a gstreamer
capture pipeline yields a zero-length file).

Ben.

Ian Molton (4):
  media: rcar_vin: Dont aggressively retire buffers
  media: rcar_vin: Ensure all in-flight buffers are returned to error
state before stopping.
  media: rcar_vin: Fix race condition terminating stream
  media: rcar_vin: Clean up rcar_vin_irq

William Towle (1):
  media: rcar_vin: move buffer management to .stop_streaming handler

 drivers/media/platform/soc_camera/rcar_vin.c |  109 ++
 1 file changed, 59 insertions(+), 50 deletions(-)

-- 
1.7.10.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


[RFC PATCH 1/5] media: rcar_vin: Dont aggressively retire buffers

2014-12-18 Thread Ben Hutchings
From: Ian Molton ian.mol...@codethink.co.uk

rcar_vin_videobuf_release() is called once per buffer from the buf_cleanup hook.

There is no need to look up the queue and free all buffers at this point.

Signed-off-by: Ian Molton ian.mol...@codethink.co.uk
Signed-off-by: William Towle william.to...@codethink.co.uk
---
 drivers/media/platform/soc_camera/rcar_vin.c |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index 8d8438b..773de53 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -496,17 +496,11 @@ static void rcar_vin_videobuf_release(struct vb2_buffer 
*vb)
 * to release could be any of the current buffers in use, so
 * release all buffers that are in use by HW
 */
-   for (i = 0; i  MAX_BUFFER_NUM; i++) {
-   if (priv-queue_buf[i]) {
-   vb2_buffer_done(priv-queue_buf[i],
-   VB2_BUF_STATE_ERROR);
-   priv-queue_buf[i] = NULL;
-   }
-   }
-   } else {
-   list_del_init(to_buf_list(vb));
+   priv-queue_buf[i] = NULL;
}
 
+   list_del_init(to_buf_list(vb));
+
spin_unlock_irq(priv-lock);
 }
 
-- 
1.7.10.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


[RFC PATCH 3/5] media: rcar_vin: Fix race condition terminating stream

2014-12-18 Thread Ben Hutchings
From: Ian Molton ian.mol...@codethink.co.uk

This patch fixes a race condition whereby a frame being captured may generate an
 interrupt between requesting capture to halt and freeing buffers.

This condition is exposed by the earlier patch that explicitly calls
vb2_buffer_done() during stop streaming.

The solution is to wait for capture to finish prior to finalising these buffers.

Signed-off-by: Ian Molton ian.mol...@codethink.co.uk
Signed-off-by: William Towle william.to...@codethink.co.uk
---
 drivers/media/platform/soc_camera/rcar_vin.c |   43 +-
 1 file changed, 28 insertions(+), 15 deletions(-)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index 7069176..b234e57 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -458,6 +458,29 @@ error:
vb2_buffer_done(vb, VB2_BUF_STATE_ERROR);
 }
 
+/*
+ * Wait for capture to stop and all in-flight buffers to be finished with by
+ * the video hardware. This must be called under priv-lock
+ *
+ */
+static void rcar_vin_wait_stop_streaming(struct rcar_vin_priv *priv)
+{
+   while (priv-state != STOPPED) {
+
+   /* issue stop if running */
+   if (priv-state == RUNNING)
+   rcar_vin_request_capture_stop(priv);
+
+   /* wait until capturing has been stopped */
+   if (priv-state == STOPPING) {
+   priv-request_to_stop = true;
+   spin_unlock_irq(priv-lock);
+   wait_for_completion(priv-capture_stop);
+   spin_lock_irq(priv-lock);
+   }
+   }
+}
+
 static void rcar_vin_videobuf_release(struct vb2_buffer *vb)
 {
struct soc_camera_device *icd = soc_camera_from_vb2q(vb-vb2_queue);
@@ -465,7 +488,6 @@ static void rcar_vin_videobuf_release(struct vb2_buffer *vb)
struct rcar_vin_priv *priv = ici-priv;
unsigned int i;
int buf_in_use = 0;
-
spin_lock_irq(priv-lock);
 
/* Is the buffer in use by the VIN hardware? */
@@ -477,20 +499,8 @@ static void rcar_vin_videobuf_release(struct vb2_buffer 
*vb)
}
 
if (buf_in_use) {
-   while (priv-state != STOPPED) {
-
-   /* issue stop if running */
-   if (priv-state == RUNNING)
-   rcar_vin_request_capture_stop(priv);
-
-   /* wait until capturing has been stopped */
-   if (priv-state == STOPPING) {
-   priv-request_to_stop = true;
-   spin_unlock_irq(priv-lock);
-   wait_for_completion(priv-capture_stop);
-   spin_lock_irq(priv-lock);
-   }
-   }
+   rcar_vin_wait_stop_streaming(priv);
+
/*
 * Capturing has now stopped. The buffer we have been asked
 * to release could be any of the current buffers in use, so
@@ -520,12 +530,15 @@ static void rcar_vin_stop_streaming(struct vb2_queue *vq)
 
spin_lock_irq(priv-lock);
 
+   rcar_vin_wait_stop_streaming(priv);
+
for (i = 0; i  vq-num_buffers; ++i)
if (vq-bufs[i]-state == VB2_BUF_STATE_ACTIVE)
vb2_buffer_done(vq-bufs[i], VB2_BUF_STATE_ERROR);
 
list_for_each_safe(buf_head, tmp, priv-capture)
list_del_init(buf_head);
+
spin_unlock_irq(priv-lock);
 }
 
-- 
1.7.10.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


[RFC PATCH 2/5] media: rcar_vin: Ensure all in-flight buffers are returned to error state before stopping.

2014-12-18 Thread Ben Hutchings
From: Ian Molton ian.mol...@codethink.co.uk

Videobuf2 complains about buffers that are still marked ACTIVE (in use by the 
driver) following a call to stop_streaming().

This patch returns all active buffers to state ERROR prior to stopping.

Note: this introduces a (non fatal) race condition as the stream is not 
guaranteed to be stopped at this point.

Signed-off-by: Ian Molton ian.mol...@codethink.co.uk
Signed-off-by: William Towle william.to...@codethink.co.uk
---
 drivers/media/platform/soc_camera/rcar_vin.c |6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index 773de53..7069176 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -516,8 +516,14 @@ static void rcar_vin_stop_streaming(struct vb2_queue *vq)
struct soc_camera_host *ici = to_soc_camera_host(icd-parent);
struct rcar_vin_priv *priv = ici-priv;
struct list_head *buf_head, *tmp;
+   int i;
 
spin_lock_irq(priv-lock);
+
+   for (i = 0; i  vq-num_buffers; ++i)
+   if (vq-bufs[i]-state == VB2_BUF_STATE_ACTIVE)
+   vb2_buffer_done(vq-bufs[i], VB2_BUF_STATE_ERROR);
+
list_for_each_safe(buf_head, tmp, priv-capture)
list_del_init(buf_head);
spin_unlock_irq(priv-lock);
-- 
1.7.10.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


[RFC PATCH 4/5] media: rcar_vin: Clean up rcar_vin_irq

2014-12-18 Thread Ben Hutchings
From: Ian Molton ian.mol...@codethink.co.uk

This patch makes the rcar_vin IRQ handler a little more readable.

Removes an else clause, and simplifies the buffer handling.

Signed-off-by: Ian Molton ian.mol...@codethink.co.uk
Reviewed-by: William Towle william.to...@codethink.co.uk
---
 drivers/media/platform/soc_camera/rcar_vin.c |   24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index b234e57..20dbedf 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -557,7 +557,6 @@ static irqreturn_t rcar_vin_irq(int irq, void *data)
struct rcar_vin_priv *priv = data;
u32 int_status;
bool can_run = false, hw_stopped;
-   int slot;
unsigned int handled = 0;
 
spin_lock(priv-lock);
@@ -576,17 +575,22 @@ static irqreturn_t rcar_vin_irq(int irq, void *data)
hw_stopped = !(ioread32(priv-base + VNMS_REG)  VNMS_CA);
 
if (!priv-request_to_stop) {
+   struct vb2_buffer **q_entry = priv-queue_buf;
+   struct vb2_buffer *vb;
+
if (is_continuous_transfer(priv))
-   slot = (ioread32(priv-base + VNMS_REG) 
-   VNMS_FBS_MASK)  VNMS_FBS_SHIFT;
-   else
-   slot = 0;
+   q_entry += (ioread32(priv-base + VNMS_REG) 
+   VNMS_FBS_MASK)  VNMS_FBS_SHIFT;
+
+   vb = *q_entry;
+
+   vb-v4l2_buf.field = priv-field;
+   vb-v4l2_buf.sequence = priv-sequence++;
+   do_gettimeofday(vb-v4l2_buf.timestamp);
+
+   vb2_buffer_done(vb, VB2_BUF_STATE_DONE);
 
-   priv-queue_buf[slot]-v4l2_buf.field = priv-field;
-   priv-queue_buf[slot]-v4l2_buf.sequence = priv-sequence++;
-   do_gettimeofday(priv-queue_buf[slot]-v4l2_buf.timestamp);
-   vb2_buffer_done(priv-queue_buf[slot], VB2_BUF_STATE_DONE);
-   priv-queue_buf[slot] = NULL;
+   *q_entry = NULL;
 
if (priv-state != STOPPING)
can_run = rcar_vin_fill_hw_slot(priv);
-- 
1.7.10.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


[RFC PATCH 5/5] media: rcar_vin: move buffer management to .stop_streaming handler

2014-12-18 Thread Ben Hutchings
From: William Towle william.to...@codethink.co.uk

Move the buffer state test in the .buf_cleanup handler into
.stop_streaming so that a) the vb2_queue API is not subverted, and
b) tracking of active-state buffers via priv-queue_buf[] is handled
as early as is possible

Signed-off-by: William Towle william.to...@codethink.co.uk
---
 drivers/media/platform/soc_camera/rcar_vin.c |   36 ++
 1 file changed, 14 insertions(+), 22 deletions(-)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index 20dbedf..bf60074 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -486,28 +486,8 @@ static void rcar_vin_videobuf_release(struct vb2_buffer 
*vb)
struct soc_camera_device *icd = soc_camera_from_vb2q(vb-vb2_queue);
struct soc_camera_host *ici = to_soc_camera_host(icd-parent);
struct rcar_vin_priv *priv = ici-priv;
-   unsigned int i;
-   int buf_in_use = 0;
-   spin_lock_irq(priv-lock);
-
-   /* Is the buffer in use by the VIN hardware? */
-   for (i = 0; i  MAX_BUFFER_NUM; i++) {
-   if (priv-queue_buf[i] == vb) {
-   buf_in_use = 1;
-   break;
-   }
-   }
 
-   if (buf_in_use) {
-   rcar_vin_wait_stop_streaming(priv);
-
-   /*
-* Capturing has now stopped. The buffer we have been asked
-* to release could be any of the current buffers in use, so
-* release all buffers that are in use by HW
-*/
-   priv-queue_buf[i] = NULL;
-   }
+   spin_lock_irq(priv-lock);
 
list_del_init(to_buf_list(vb));
 
@@ -533,8 +513,20 @@ static void rcar_vin_stop_streaming(struct vb2_queue *vq)
rcar_vin_wait_stop_streaming(priv);
 
for (i = 0; i  vq-num_buffers; ++i)
-   if (vq-bufs[i]-state == VB2_BUF_STATE_ACTIVE)
+   if (vq-bufs[i]-state == VB2_BUF_STATE_ACTIVE) {
+   int j;
+
+   /*  Is this a buffer we have told the
+*  hardware about? Update the associated
+*  list, if so
+*/
+   for (j = 0; j  MAX_BUFFER_NUM; j++) {
+   if (priv-queue_buf[j] == vq-bufs[i]) {
+   priv-queue_buf[j] = NULL;
+   }
+   }
vb2_buffer_done(vq-bufs[i], VB2_BUF_STATE_ERROR);
+   }
 
list_for_each_safe(buf_head, tmp, priv-capture)
list_del_init(buf_head);
-- 
1.7.10.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: [PATCHv2 07/29] platform drivers: Fix build on cris and frv archs

2013-11-03 Thread Ben Hutchings
On Sat, 2013-11-02 at 11:31 -0200, Mauro Carvalho Chehab wrote:
 On cris and frv archs, the functions below aren't defined:
   drivers/media/platform/sh_veu.c: In function 'sh_veu_reg_read':
   drivers/media/platform/sh_veu.c:228:2: error: implicit declaration of 
 function 'ioread32' [-Werror=implicit-function-declaration]
   drivers/media/platform/sh_veu.c: In function 'sh_veu_reg_write':
   drivers/media/platform/sh_veu.c:234:2: error: implicit declaration of 
 function 'iowrite32' [-Werror=implicit-function-declaration]
   drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_read':
   drivers/media/platform/vsp1/vsp1.h:66:2: error: implicit declaration of 
 function 'ioread32' [-Werror=implicit-function-declaration]
   drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_write':
   drivers/media/platform/vsp1/vsp1.h:71:2: error: implicit declaration of 
 function 'iowrite32' [-Werror=implicit-function-declaration]
   drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_read':
   drivers/media/platform/vsp1/vsp1.h:66:2: error: implicit declaration of 
 function 'ioread32' [-Werror=implicit-function-declaration]
   drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_write':
   drivers/media/platform/vsp1/vsp1.h:71:2: error: implicit declaration of 
 function 'iowrite32' [-Werror=implicit-function-declaration]
   drivers/media/platform/soc_camera/rcar_vin.c: In function 
 'rcar_vin_setup':
   drivers/media/platform/soc_camera/rcar_vin.c:284:3: error: implicit 
 declaration of function 'iowrite32' [-Werror=implicit-function-declaration]
   drivers/media/platform/soc_camera/rcar_vin.c: In function 
 'rcar_vin_request_capture_stop':
   drivers/media/platform/soc_camera/rcar_vin.c:353:2: error: implicit 
 declaration of function 'ioread32' [-Werror=implicit-function-declaration]
 
 While this is not fixed, remove those 3 drivers from building on
 those archs.
[...]

Well where does this stop?  There will be many other drivers that are
broken if those functions are missing, and there's going to be a lot of
churn if we disable them all and then reenable when the architecture
headers are fixed.

cris selects the generic implementations (CONFIG_GENERIC_IOMAP) but I
think arch/cris/include/asm/io.h is missing
#include asm-generic/iomap.h.

frv defines these functions inline in arch/frv/include/asm/io.h so I
don't know what the problem is there.

Ben.

-- 
Ben Hutchings
Kids!  Bringing about Armageddon can be dangerous.  Do not attempt it in
your own home. - Terry Pratchett and Neil Gaiman, `Good Omens'


signature.asc
Description: This is a digitally signed message part


Re: [PATCH 01/51] DMA-API: provide a helper to set both DMA and coherent DMA masks

2013-09-19 Thread Ben Hutchings
On Thu, 2013-09-19 at 22:25 +0100, Russell King wrote:
 Provide a helper to set both the DMA and coherent DMA masks to the
 same value - this avoids duplicated code in a number of drivers,
 sometimes with buggy error handling, and also allows us identify
 which drivers do things differently.
 
 Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
 ---
  Documentation/DMA-API-HOWTO.txt |   37 ++---
  Documentation/DMA-API.txt   |8 
  include/linux/dma-mapping.h |   14 ++
  3 files changed, 44 insertions(+), 15 deletions(-)
 
 diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
 index 14129f1..5e98303 100644
 --- a/Documentation/DMA-API-HOWTO.txt
 +++ b/Documentation/DMA-API-HOWTO.txt
[...]
 -dma_set_coherent_mask() will always be able to set the same or a
 -smaller mask as dma_set_mask(). However for the rare case that a
 +The coherent coherent mask will always be able to set the same or a
 +smaller mask as the streaming mask. However for the rare case that a
[...]

The new wording doesn't make sense; a mask doesn't set itself.  I would
suggest:

The coherent mask can always be set to the same or a smaller mask than
the streaming mask.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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 0/4] [media] Make lirc_bt829 a well-behaved PCI driver

2013-09-04 Thread Ben Hutchings
On Mon, 2013-09-02 at 01:36 +0100, Ben Hutchings wrote:
 I noticed lirc_bt829 didn't have a module device ID table, so I set out
 to fix that and ended up with this series.
 
 It still appears to do everything else wrong (like reinventing
 i2c-algo-bit) though...
 
 This is compile-tested only.

On reflection, I think it might be better to leave this driver 'badly
behaved'.  It wants to use registers on a Mach64 VT, which has a
separate kernel framebuffer driver (atyfb) and userland X driver
(mach64).  If this driver is compatible with them now, changing it is
liable to break that.

I'll repost the minor fixes.

Ben.

-- 
Ben Hutchings
Knowledge is power.  France is bacon.


signature.asc
Description: This is a digitally signed message part


[PATCH v2 0/4] lirc_bt829 fixes, second try

2013-09-04 Thread Ben Hutchings
A less ambitious set of fixes for the lirc_bt829 driver.

Ben.

Ben Hutchings (4):
  [media] lirc_bt829: Fix physical address type
  [media] lirc_bt829: Fix iomap and PCI device leaks
  [media] lirc_bt829: Enable and disable device
  [media] lirc_bt829: Note in TODO why it can't be a normal PCI driver
yet

 drivers/staging/media/lirc/TODO |  5 +
 drivers/staging/media/lirc/lirc_bt829.c | 33 +++--
 2 files changed, 32 insertions(+), 6 deletions(-)




signature.asc
Description: This is a digitally signed message part


[PATCH v2 1/4] [media] lirc_bt829: Fix physical address type

2013-09-04 Thread Ben Hutchings
Use phys_addr_t and log format %pa.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/lirc_bt829.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_bt829.c 
b/drivers/staging/media/lirc/lirc_bt829.c
index fa31ee7..9c7be55 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -63,7 +63,7 @@ static bool debug;
} while (0)
 
 static int atir_minor;
-static unsigned long pci_addr_phys;
+static phys_addr_t pci_addr_phys;
 static unsigned char *pci_addr_lin;
 
 static struct lirc_driver atir_driver;
@@ -78,8 +78,7 @@ static struct pci_dev *do_pci_probe(void)
pci_addr_phys = 0;
if (my_dev-resource[0].flags  IORESOURCE_MEM) {
pci_addr_phys = my_dev-resource[0].start;
-   pr_info(memory at 0x%08X\n,
-  (unsigned int)pci_addr_phys);
+   pr_info(memory at %pa\n, pci_addr_phys);
}
if (pci_addr_phys == 0) {
pr_err(no memory resource ?\n);




signature.asc
Description: This is a digitally signed message part


[PATCH v2 2/4] [media] lirc_bt829: Fix iomap and PCI device leaks

2013-09-04 Thread Ben Hutchings
We must call iounmap() and pci_dev_put() when removed and on
the probe failure path.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/lirc_bt829.c | 21 ++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_bt829.c 
b/drivers/staging/media/lirc/lirc_bt829.c
index 9c7be55..a61d233 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -82,6 +82,7 @@ static struct pci_dev *do_pci_probe(void)
}
if (pci_addr_phys == 0) {
pr_err(no memory resource ?\n);
+   pci_dev_put(my_dev);
return NULL;
}
} else {
@@ -119,13 +120,16 @@ static void atir_set_use_dec(void *data)
 int init_module(void)
 {
struct pci_dev *pdev;
+   int rc;
 
pdev = do_pci_probe();
if (pdev == NULL)
return -ENODEV;
 
-   if (!atir_init_start())
-   return -ENODEV;
+   if (!atir_init_start()) {
+   rc = -ENODEV;
+   goto err_put_dev;
+   }
 
strcpy(atir_driver.name, ATIR);
atir_driver.minor   = -1;
@@ -141,17 +145,28 @@ int init_module(void)
atir_minor = lirc_register_driver(atir_driver);
if (atir_minor  0) {
pr_err(failed to register driver!\n);
-   return atir_minor;
+   rc = atir_minor;
+   goto err_unmap;
}
dprintk(driver is registered on minor %d\n, atir_minor);
 
return 0;
+
+err_unmap:
+   iounmap(pci_addr_lin);
+err_put_dev:
+   pci_dev_put(pdev);
+   return rc;
 }
 

 void cleanup_module(void)
 {
+   struct pci_dev *pdev = to_pci_dev(atir_driver.dev);
+
lirc_unregister_driver(atir_minor);
+   iounmap(pci_addr_lin);
+   pci_dev_put(pdev);
 }
 





signature.asc
Description: This is a digitally signed message part


[PATCH v2 4/4] [media] lirc_bt829: Note in TODO why it can't be a normal PCI driver yet

2013-09-04 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/TODO | 5 +
 1 file changed, 5 insertions(+)

diff --git a/drivers/staging/media/lirc/TODO b/drivers/staging/media/lirc/TODO
index b6cb593..cbea5d8 100644
--- a/drivers/staging/media/lirc/TODO
+++ b/drivers/staging/media/lirc/TODO
@@ -2,6 +2,11 @@
   (see drivers/media/IR/mceusb.c vs. lirc_mceusb.c in lirc cvs for an
   example of a previously completed port).
 
+- lirc_bt829 uses registers on a Mach64 VT, which has a separate kernel
+  framebuffer driver (atyfb) and userland X driver (mach64).  It can't
+  simply be converted to a normal PCI driver, but ideally it should be
+  coordinated with the other drivers.
+
 Please send patches to:
 Jarod Wilson ja...@wilsonet.com
 Greg Kroah-Hartman g...@kroah.com



signature.asc
Description: This is a digitally signed message part


[PATCH v2 3/4] [media] lirc_bt829: Enable and disable device

2013-09-04 Thread Ben Hutchings
We must not assume that the PCI device is already enabled.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/lirc_bt829.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/lirc/lirc_bt829.c 
b/drivers/staging/media/lirc/lirc_bt829.c
index a61d233..623f10e 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -126,9 +126,13 @@ int init_module(void)
if (pdev == NULL)
return -ENODEV;
 
+   rc = pci_enable_device(pdev);
+   if (rc)
+   goto err_put_dev;
+
if (!atir_init_start()) {
rc = -ENODEV;
-   goto err_put_dev;
+   goto err_disable;
}
 
strcpy(atir_driver.name, ATIR);
@@ -154,6 +158,8 @@ int init_module(void)
 
 err_unmap:
iounmap(pci_addr_lin);
+err_disable:
+   pci_disable_device(pdev);
 err_put_dev:
pci_dev_put(pdev);
return rc;
@@ -166,6 +172,7 @@ void cleanup_module(void)
 
lirc_unregister_driver(atir_minor);
iounmap(pci_addr_lin);
+   pci_disable_device(pdev);
pci_dev_put(pdev);
 }
 




signature.asc
Description: This is a digitally signed message part


[PATCH 0/4] [media] Make lirc_bt829 a well-behaved PCI driver

2013-09-01 Thread Ben Hutchings
I noticed lirc_bt829 didn't have a module device ID table, so I set out
to fix that and ended up with this series.

It still appears to do everything else wrong (like reinventing
i2c-algo-bit) though...

This is compile-tested only.

Ben.

Ben Hutchings (4):
  [media] lirc_bt829: Make it a proper PCI driver
  [media] lirc_bt829: Fix physical address type
  [media] lirc_bt829: Fix iomap leak
  [media] lirc_bt829: Enable and disable memory BAR

 drivers/staging/media/lirc/lirc_bt829.c | 286 +---
 1 file changed, 154 insertions(+), 132 deletions(-)




signature.asc
Description: This is a digitally signed message part


[PATCH 1/4] [media] lirc_bt829: Make it a proper PCI driver

2013-09-01 Thread Ben Hutchings
Replace static variables with a device structure and pass pointers
to this into all the functions that need it.

Fold init_module(), do_pci_probe() and atir_init_start() into a
single probe function.  Use dev_err() to provide context for
logging.

This also fixes a device reference leak, as the driver wasn't
calling pci_dev_put().

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/lirc_bt829.c | 276 +---
 1 file changed, 144 insertions(+), 132 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_bt829.c 
b/drivers/staging/media/lirc/lirc_bt829.c
index fa31ee7..c277bf3 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -30,25 +30,32 @@
 
 #include media/lirc_dev.h
 
-static int poll_main(void);
-static int atir_init_start(void);
+struct atir_device {
+   int minor;
+   unsigned char *pci_addr_lin;
+   struct lirc_driver driver;
+};
 
-static void write_index(unsigned char index, unsigned int value);
-static unsigned int read_index(unsigned char index);
+static int poll_main(struct atir_device *atir);
 
-static void do_i2c_start(void);
-static void do_i2c_stop(void);
+static void write_index(struct atir_device *atir, unsigned char index,
+   unsigned int value);
+static unsigned int read_index(struct atir_device *atir, unsigned char index);
 
-static void seems_wr_byte(unsigned char al);
-static unsigned char seems_rd_byte(void);
+static void do_i2c_start(struct atir_device *atir);
+static void do_i2c_stop(struct atir_device *atir);
 
-static unsigned int read_index(unsigned char al);
-static void write_index(unsigned char ah, unsigned int edx);
+static void seems_wr_byte(struct atir_device *atir, unsigned char al);
+static unsigned char seems_rd_byte(struct atir_device *atir);
+
+static unsigned int read_index(struct atir_device *atir, unsigned char al);
+static void write_index(struct atir_device *atir, unsigned char ah,
+   unsigned int edx);
 
 static void cycle_delay(int cycle);
 
-static void do_set_bits(unsigned char bl);
-static unsigned char do_get_bits(void);
+static void do_set_bits(struct atir_device *atir, unsigned char bl);
+static unsigned char do_get_bits(struct atir_device *atir);
 
 #define DATA_PCI_OFF 0x7FFC00
 #define WAIT_CYCLE   20
@@ -62,41 +69,12 @@ static bool debug;
printk(KERN_DEBUG DRIVER_NAME : fmt, ## args); \
} while (0)
 
-static int atir_minor;
-static unsigned long pci_addr_phys;
-static unsigned char *pci_addr_lin;
-
-static struct lirc_driver atir_driver;
-
-static struct pci_dev *do_pci_probe(void)
-{
-   struct pci_dev *my_dev;
-   my_dev = pci_get_device(PCI_VENDOR_ID_ATI,
-   PCI_DEVICE_ID_ATI_264VT, NULL);
-   if (my_dev) {
-   pr_err(Using device: %s\n, pci_name(my_dev));
-   pci_addr_phys = 0;
-   if (my_dev-resource[0].flags  IORESOURCE_MEM) {
-   pci_addr_phys = my_dev-resource[0].start;
-   pr_info(memory at 0x%08X\n,
-  (unsigned int)pci_addr_phys);
-   }
-   if (pci_addr_phys == 0) {
-   pr_err(no memory resource ?\n);
-   return NULL;
-   }
-   } else {
-   pr_err(pci_probe failed\n);
-   return NULL;
-   }
-   return my_dev;
-}
-
 static int atir_add_to_buf(void *data, struct lirc_buffer *buf)
 {
+   struct atir_device *atir = data;
unsigned char key;
int status;
-   status = poll_main();
+   status = poll_main(atir);
key = (status  8)  0xFF;
if (status  0xFF) {
dprintk(reading key %02X\n, key);
@@ -117,172 +95,191 @@ static void atir_set_use_dec(void *data)
dprintk(driver is closed\n);
 }
 
-int init_module(void)
+static int atir_pci_probe(struct pci_dev *pdev,
+ const struct pci_device_id *entry)
 {
-   struct pci_dev *pdev;
-
-   pdev = do_pci_probe();
-   if (pdev == NULL)
-   return -ENODEV;
-
-   if (!atir_init_start())
-   return -ENODEV;
-
-   strcpy(atir_driver.name, ATIR);
-   atir_driver.minor   = -1;
-   atir_driver.code_length = 8;
-   atir_driver.sample_rate = 10;
-   atir_driver.data= 0;
-   atir_driver.add_to_buf  = atir_add_to_buf;
-   atir_driver.set_use_inc = atir_set_use_inc;
-   atir_driver.set_use_dec = atir_set_use_dec;
-   atir_driver.dev = pdev-dev;
-   atir_driver.owner   = THIS_MODULE;
-
-   atir_minor = lirc_register_driver(atir_driver);
-   if (atir_minor  0) {
-   pr_err(failed to register driver!\n);
-   return atir_minor;
+   struct atir_device *atir;
+   unsigned long pci_addr_phys;
+   int rc;
+
+   atir = kzalloc(sizeof(*atir

[PATCH 2/4] [media] lirc_bt829: Fix physical address type

2013-09-01 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/lirc_bt829.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_bt829.c 
b/drivers/staging/media/lirc/lirc_bt829.c
index c277bf3..8c5ba2a 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -99,7 +99,7 @@ static int atir_pci_probe(struct pci_dev *pdev,
  const struct pci_device_id *entry)
 {
struct atir_device *atir;
-   unsigned long pci_addr_phys;
+   phys_addr_t pci_addr_phys;
int rc;
 
atir = kzalloc(sizeof(*atir), GFP_KERNEL);
@@ -115,8 +115,8 @@ static int atir_pci_probe(struct pci_dev *pdev,
}
 
pci_addr_phys = pdev-resource[0].start;
-   dev_info(pdev-dev, memory at 0x%08X\n,
-(unsigned int)pci_addr_phys);
+   dev_info(pdev-dev, memory at 0x%08llX\n,
+(unsigned long long)pci_addr_phys);
 
atir-pci_addr_lin = ioremap(pci_addr_phys + DATA_PCI_OFF, 0x400);
if (atir-pci_addr_lin == 0) {




signature.asc
Description: This is a digitally signed message part


[PATCH 4/4] [media] lirc_bt829: Enable and disable memory BAR

2013-09-01 Thread Ben Hutchings
We must not assume that the PCI device is already enabled.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/lirc_bt829.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/lirc/lirc_bt829.c 
b/drivers/staging/media/lirc/lirc_bt829.c
index 76e6cfb..b386628 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -118,11 +118,15 @@ static int atir_pci_probe(struct pci_dev *pdev,
dev_info(pdev-dev, memory at 0x%08llX\n,
 (unsigned long long)pci_addr_phys);
 
+   rc = pci_enable_device_mem(pdev);
+   if (rc)
+   goto err_free;
+
atir-pci_addr_lin = ioremap(pci_addr_phys + DATA_PCI_OFF, 0x400);
if (atir-pci_addr_lin == 0) {
dev_err(pdev-dev, pci mem must be mapped\n);
rc = -ENODEV;
-   goto err_free;
+   goto err_disable;
}
 
strcpy(atir-driver.name, ATIR);
@@ -148,6 +152,8 @@ static int atir_pci_probe(struct pci_dev *pdev,
 
 err_unmap:
iounmap(atir-pci_addr_lin);
+err_disable:
+   pci_disable_device(pdev);
 err_free:
pci_set_drvdata(pdev, NULL);
kfree(atir);
@@ -161,6 +167,7 @@ static void atir_pci_remove(struct pci_dev *pdev)
 
lirc_unregister_driver(atir-minor);
iounmap(atir-pci_addr_lin);
+   pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
kfree(atir);
 }



signature.asc
Description: This is a digitally signed message part


[PATCH 3/4] [media] lirc_bt829: Fix iomap leak

2013-09-01 Thread Ben Hutchings
We must call iounmap() when removed from a device.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/lirc_bt829.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/lirc/lirc_bt829.c 
b/drivers/staging/media/lirc/lirc_bt829.c
index 8c5ba2a..76e6cfb 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -140,12 +140,14 @@ static int atir_pci_probe(struct pci_dev *pdev,
if (atir-minor  0) {
dev_err(pdev-dev, failed to register driver!\n);
rc = atir-minor;
-   goto err_free;
+   goto err_unmap;
}
dprintk(driver is registered on minor %d\n, atir-minor);
 
return 0;
 
+err_unmap:
+   iounmap(atir-pci_addr_lin);
 err_free:
pci_set_drvdata(pdev, NULL);
kfree(atir);
@@ -158,6 +160,7 @@ static void atir_pci_remove(struct pci_dev *pdev)
struct atir_device *atir = pci_get_drvdata(pdev);
 
lirc_unregister_driver(atir-minor);
+   iounmap(atir-pci_addr_lin);
pci_set_drvdata(pdev, NULL);
kfree(atir);
 }




signature.asc
Description: This is a digitally signed message part


Re: [PATCH 2/4] [media] lirc_bt829: Fix physical address type

2013-09-01 Thread Ben Hutchings
On Sun, 2013-09-01 at 22:37 -0300, Fabio Estevam wrote:
 On Sun, Sep 1, 2013 at 9:39 PM, Ben Hutchings b...@decadent.org.uk wrote:
 
  pci_addr_phys = pdev-resource[0].start;
  -   dev_info(pdev-dev, memory at 0x%08X\n,
  -(unsigned int)pci_addr_phys);
  +   dev_info(pdev-dev, memory at 0x%08llX\n,
  +(unsigned long long)pci_addr_phys);
 
 You could use %pa instead for printing phys_addr_t:
 
 dev_info(pdev-dev, memory at %pa\n, pci_addr_phys);

Could do, but I'm not sure it's clearer.  And all these %p formats
defeat type-checking anyway.

Ben.

-- 
Ben Hutchings
If you seem to know what you are doing, you'll be given more to do.


signature.asc
Description: This is a digitally signed message part


Re: [GIT PULL] go7007 firmware updates

2013-05-29 Thread Ben Hutchings
On Tue, 2013-05-28 at 08:42 +0200, Hans Verkuil wrote:
 On Mon May 27 2013 23:53:15 Ben Hutchings wrote:
  On Mon, 2013-05-27 at 21:56 +0200, Hans Verkuil wrote:
   On Mon May 27 2013 18:24:32 Ben Hutchings wrote:
On Thu, 2013-05-23 at 10:25 +0200, Hans Verkuil wrote:
 Hi Ben, David,
 
 The go7007 staging driver has been substantially overhauled for 
 kernel 3.10.
 As part of that process the firmware situation has been improved as 
 well.
 
 While Micronas allowed the firmware to be redistributed, it was never 
 made
 part of linux-firmware. Only the firmwares for the Sensoray S2250 
 were added
 in the past, but those need the go7007*.bin firmwares as well to work.
 
 This pull request collects all the firmwares necessary to support all 
 the
 go7007 devices into the go7007 directory. With this change the go7007 
 driver
 will work out-of-the-box starting with kernel 3.10.
[...]

You should not rename files like this.  linux-firmware is not versioned
and needs to be compatible with old and new kernel versions, so far as
possible.
   
   I understand, and I wouldn't have renamed these two firmware files if it
   wasn't for the fact that 1) it concerns a staging driver, so in my view
   backwards compatibility is not a requirement,
  
  This driver (or set of drivers) has been requesting go7007fw.bin,
  go7007tv.bin, s2250.fw and s2250_loader.fw for nearly 5 years.  It's a
  bit late to say those were just temporary filenames.
 
 Why not? It is a staging driver for good reasons. Just because it is in 
 staging
 for a long time (because nobody found the time to actually work on it until
 3.10) doesn't mean it magically becomes non-staging. The Kconfig in staging
 says:
 
   This option allows you to select a number of drivers that are
   not of the normal Linux kernel quality level.  These drivers
   are placed here in order to get a wider audience to make use of
   them.  Please note that these drivers are under heavy
   development, may or may not work, and may contain userspace
   interfaces that most likely will be changed in the near
   future.
 
 In other words, there are no guarantees. That's the whole point of staging.
[...]

But the reality is that many drivers don't get that heavy development,
and so they linger in staging for a long time.  So it shouldn't be
surprising that users start to rely on them, and distributions ship
them, and then it's a bit rough to pull the rug from under them some
years later.

I don't know how true that is of go7007 but I'd like to avoid causing
regressions.  So I've pulled from you, but I've then added back s2250.fw
and s2250_loader.fw as symlinks.

Ben.

-- 
Ben Hutchings
If at first you don't succeed, you're doing about average.


signature.asc
Description: This is a digitally signed message part


Re: [GIT PULL] go7007 firmware updates

2013-05-27 Thread Ben Hutchings
On Thu, 2013-05-23 at 10:25 +0200, Hans Verkuil wrote:
 Hi Ben, David,
 
 The go7007 staging driver has been substantially overhauled for kernel 3.10.
 As part of that process the firmware situation has been improved as well.
 
 While Micronas allowed the firmware to be redistributed, it was never made
 part of linux-firmware. Only the firmwares for the Sensoray S2250 were added
 in the past, but those need the go7007*.bin firmwares as well to work.
 
 This pull request collects all the firmwares necessary to support all the
 go7007 devices into the go7007 directory. With this change the go7007 driver
 will work out-of-the-box starting with kernel 3.10.
[...]

You should not rename files like this.  linux-firmware is not versioned
and needs to be compatible with old and new kernel versions, so far as
possible.

So the filenames in linux-firmware should match whatever the driver has
used up to now.  If the driver has been changed in 3.10-rc to use
different filenames, it's not too late to revert this mistake in the
driver.  But if such a change was made earlier, we'll need to add
symlinks.

Ben.

-- 
Ben Hutchings
Experience is what causes a person to make new mistakes instead of old ones.


signature.asc
Description: This is a digitally signed message part


Re: [GIT PULL] go7007 firmware updates

2013-05-27 Thread Ben Hutchings
On Mon, 2013-05-27 at 21:56 +0200, Hans Verkuil wrote:
 On Mon May 27 2013 18:24:32 Ben Hutchings wrote:
  On Thu, 2013-05-23 at 10:25 +0200, Hans Verkuil wrote:
   Hi Ben, David,
   
   The go7007 staging driver has been substantially overhauled for kernel 
   3.10.
   As part of that process the firmware situation has been improved as well.
   
   While Micronas allowed the firmware to be redistributed, it was never made
   part of linux-firmware. Only the firmwares for the Sensoray S2250 were 
   added
   in the past, but those need the go7007*.bin firmwares as well to work.
   
   This pull request collects all the firmwares necessary to support all the
   go7007 devices into the go7007 directory. With this change the go7007 
   driver
   will work out-of-the-box starting with kernel 3.10.
  [...]
  
  You should not rename files like this.  linux-firmware is not versioned
  and needs to be compatible with old and new kernel versions, so far as
  possible.
 
 I understand, and I wouldn't have renamed these two firmware files if it
 wasn't for the fact that 1) it concerns a staging driver, so in my view
 backwards compatibility is not a requirement,

This driver (or set of drivers) has been requesting go7007fw.bin,
go7007tv.bin, s2250.fw and s2250_loader.fw for nearly 5 years.  It's a
bit late to say those were just temporary filenames.

 and 2) the firmware files
 currently in linux-firmware were never enough to make the Sensoray S2250
 work, you always needed additional external firmwares as well.
 
  So the filenames in linux-firmware should match whatever the driver has
  used up to now.  If the driver has been changed in 3.10-rc to use
  different filenames, it's not too late to revert this mistake in the
  driver.  But if such a change was made earlier, we'll need to add
  symlinks.
 
 I can revert the rename action, but I would rather not do it. I believe
 there are good reasons for doing this, especially since the current
 situation is effectively broken anyway due to the missing firmware files.

Were the 'new' files unavailable to the public, or only available from a
manufacturer web site?

Ben.

 If you really don't want to rename the two S2250 files, then I'll make
 a patch reverting those to the original filename.
 
 Pete, if you have an opinion regarding this, please let us know. After all,
 it concerns a Sensoray device.

-- 
Ben Hutchings
Experience is what causes a person to make new mistakes instead of old ones.


signature.asc
Description: This is a digitally signed message part


Re: [PATCH stable v3.7] media mantis: fix silly crash case

2013-05-27 Thread Ben Hutchings
On Tue, 2013-05-21 at 15:07 +0200, Bjørn Mork wrote:
 Hello,
 
 Please apply mainline commit e1d45ae to any maintained stable kernel
 prior to v3.7.  I just hit this bug on a Debian 3.2.41-2+deb7u2 kernel:
[...]

Queued up for 3.2, thanks.

Ben.

-- 
Ben Hutchings
If at first you don't succeed, you're doing about average.


signature.asc
Description: This is a digitally signed message part


Re: Firmware for cx23885 in linux-firmware.git is broken

2013-02-24 Thread Ben Hutchings
On Sun, 2013-02-24 at 11:36 -0500, Joseph Yasi wrote:
 On Sun, Feb 24, 2013 at 7:22 AM, Mauro Carvalho Chehab
 mche...@redhat.com wrote:
  Em Sun, 24 Feb 2013 03:16:35 +
  Ben Hutchings b...@decadent.org.uk escreveu:
[...]
  For now, I think we should delete the current version.
 
  That seems to be the only approach left, if neither Conexant or Hauppauge
  could help solving this dilema.
 
 I agree with removing it from the tree for now. The card doesn't work
 with the current firmware encoder firmware in tree, and it's annoying
 to have the working version extracted from the driver overwritten
 everything a new linux-firmware package is pushed to the Ubuntu
 repositories.

Done.

Ben.

-- 
Ben Hutchings
Absolutum obsoletum. (If it works, it's out of date.) - Stafford Beer


signature.asc
Description: This is a digitally signed message part


Re: Firmware for cx23885 in linux-firmware.git is broken

2013-02-23 Thread Ben Hutchings
On Fri, 2013-02-22 at 19:30 -0500, Joseph Yasi wrote:
 Hi,
 
 I'm not sure the appropriate list to email for this, but the
 v4l-cx23885-enc.fw file in the linux-firmware.git tree is incorrect.
 It is the wrong size and just a duplicate of the
 v4l-cx23885-avcore-01.fw. The correct file can be extracted from the
 HVR1800 drivers here: http://steventoth.net/linux/hvr1800/.

This was previously requested
http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/57816 
but unfortunately it's not clear that it would be legal to redistribute 
firmware extracted from that driver (or the driver itself).

For now, I think we should delete the current version.

Ben.

-- 
Ben Hutchings
Absolutum obsoletum. (If it works, it's out of date.) - Stafford Beer


signature.asc
Description: This is a digitally signed message part


Re: [GIT PULL] linux-firmware: cx23885: update to Version 2.06.139

2012-12-03 Thread Ben Hutchings
On Mon, 2012-12-03 at 11:13 -0700, Tim Gardner wrote:
 Ben - what is your policy on extracting firmware from Windows drivers?

I suppose the policy should be that the driver's licence must allow
extracting and then distributing the result.  Which I wouldn't expect
ever to be the case, in practice.

Your commit message refers to the Hauppuage driver package at
http://steventoth.net/linux/hvr1800/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip.  
I didn't find any licence text, other than 'All rights reserved', in either 
that or the currently distributed version of the same driver 
http://www.wintvcd.co.uk/drivers/HVR-12x0-14x0-17x0-33x0-44x0_1_48_29272_SIGNED.zip.

 It seems like it ought to be OK, and they _are_ the same files that are
 covered under the license in WHENCE.

I'm not sure how you can say they are the same files, as you're
proposing to change the contents.  The copyright on the current files
belongs to the chipset vendor, Conexant, and Hauppuage *presumably* used
firmware supplied by Conexant, but either of them might have chosen a
different licence for the versions in this driver package.

 The following changes since commit bda53ca96deb3cacbef10a7a84bbaee2d09c7f34:
 
   brcm: new firmware version for brcmsmac (2012-12-03 14:46:28 +)
 
 are available in the git repository at:
 
   git://kernel.ubuntu.com/rtg/linux-firmware.git master
 
 for you to fetch changes up to 3c592f80519a7e82eadeccfad7a5cd1604ca463c:
 
   cx23885: update to Version 2.06.139 (2012-12-03 11:07:43 -0700)
 
 
 Tim Gardner (1):
   cx23885: update to Version 2.06.139
 
  v4l-cx23885-avcore-01.fw |  Bin 16382 - 16382 bytes
  v4l-cx23885-enc.fw   |  Bin 16382 - 376836 bytes
  2 files changed, 0 insertions(+), 0 deletions(-)

How odd, these two files are currently identical to each other...

Ben.

-- 
Ben Hutchings
Always try to do things in chronological order;
it's less confusing that way.


signature.asc
Description: This is a digitally signed message part


[PATCH] drxk: Use BUG() for invalid numberOfParameters in QAMDemodulatorCommand()

2012-11-05 Thread Ben Hutchings
If numberOfParameters is not 2 or 4, we log a warning and then
continue.  Depending on compiler version and options, this may be
recognised as an impossible case or may otherwise provoke the warning
that 'status' is uninitialised.  Using the more forceful BUG() avoids
this warning, and makes it harder to ignore incorrect usage.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb-frontends/drxk_hard.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/drxk_hard.c 
b/drivers/media/dvb-frontends/drxk_hard.c
index 8b4c6d5..6da00ac 100644
--- a/drivers/media/dvb-frontends/drxk_hard.c
+++ b/drivers/media/dvb-frontends/drxk_hard.c
@@ -5459,8 +5459,7 @@ static int QAMDemodulatorCommand(struct drxk_state *state,
 numberOfParameters, setParamParameters,
 1, cmdResult);
} else {
-   printk(KERN_WARNING drxk: Unknown QAM demodulator parameter 
-   count %d\n, numberOfParameters);
+   BUG();
}
 
 error:


--
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 v2] [media] rc-core: prevent divide by zero bug in s_tx_carrier()

2012-09-09 Thread Ben Hutchings
On Sun, 2012-09-09 at 23:01 +0200, walter harms wrote:
 Hi all,
 I am not sure if that is a good idea.
 it should be in the hands of the driver who to use these 'val'

 some driver may need a higher value like this one:

I doubt that any driver can actually work with the full range of
positive values, but at least they're less likely to crash.

 static int iguanair_set_tx_carrier(struct rc_dev *dev, uint32_t carrier)
 {
   struct iguanair *ir = dev-priv;
 
   if (carrier  25000 || carrier  15)
   return -EINVAL;
 
 There are also examples where 0 has a special meaning (to be fair not
 with this function). Example:
   cfsetospeed() ...  The zero baud rate, B0, is used to terminate the 
 connection.

 I have no clue who will use the 0 but ...
[...]

If an ioctl is defined for a whole class of devices then it is perfectly
valid for the core code for that class to do (some) parameter validation
for the ioctl.  As I'm not really familiar with LIRC I can't say for
sure that 0 is invalid, but if it is then driver writers should not
expect to be able to assign a driver-specific meaning to it.  Consider
what would happen if the LIRC developers wanted to assign a generic
meaning to a value of 0 some time later.

Ben.

-- 
Ben Hutchings
Time is nature's way of making sure that everything doesn't happen at once.


signature.asc
Description: This is a digitally signed message part


Re: [patch v2] [media] rc-core: prevent divide by zero bug in s_tx_carrier()

2012-09-09 Thread Ben Hutchings
On Sun, 2012-09-09 at 23:26 +0100, Sean Young wrote:
 On Sun, Sep 09, 2012 at 11:31:42PM +0300, Dan Carpenter wrote:
  Several of the drivers use carrier as a divisor in their s_tx_carrier()
  functions.  We should do a sanity check here like we do for
  LIRC_SET_REC_CARRIER.
  
  Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
  ---
  v2: Ben Hutchings pointed out that my first patch was not a complete
  fix.
  
  diff --git a/drivers/media/rc/ir-lirc-codec.c 
  b/drivers/media/rc/ir-lirc-codec.c
  index 6ad4a07..28dc0f0 100644
  --- a/drivers/media/rc/ir-lirc-codec.c
  +++ b/drivers/media/rc/ir-lirc-codec.c
  @@ -211,6 +211,9 @@ static long ir_lirc_ioctl(struct file *filep, unsigned 
  int cmd,
  if (!dev-s_tx_carrier)
  return -EINVAL;
 
 This should be ENOSYS.
 
   
  +   if (val = 0)
  +   return -EINVAL;
  +
 
 1) val is unsigned so it would never be less than zero.
 
 2) A value of zero means disabling carrier modulation, which is used by 
the mceusb driver.

 So the check belongs in the individual drivers, as in the original patch.

Oh well, sorry for pointing Dan in the wrong direction.  Is the special
case documented somewhere?

Ben.

-- 
Ben Hutchings
Time is nature's way of making sure that everything doesn't happen at once.


signature.asc
Description: This is a digitally signed message part


Re: [PATCH v2] [media] rc: ite-cir: Initialise ite_dev::rdev earlier

2012-08-28 Thread Ben Hutchings
On Tue, 2012-08-28 at 12:44 +0100, Luis Henriques wrote:
 On Mon, Aug 20, 2012 at 12:32:27AM +0100, Ben Hutchings wrote:
  ite_dev::rdev is currently initialised in ite_probe() after
  rc_register_device() returns.  If a newly registered device is opened
  quickly enough, we may enable interrupts and try to use ite_dev::rdev
  before it has been initialised.  Move it up to the earliest point we
  can, right after calling rc_allocate_device().
 
 I believe this is the same bug:
 
 https://bugzilla.kernel.org/show_bug.cgi?id=46391
 
 And the bug is present in other IR devices as well.
 
 I've sent a proposed fix:
 
 http://marc.info/?l=linux-kernelm=134590803109050w=2

It might be a worthwhile fix.  But it doesn't fix this bug - after that
patch, the driver will still enable its IRQ before initialising
ite_dev::rdev.

Ben.

 Cheers,
 --
 Luis
 
  
  References: http://bugs.debian.org/684441 Reported-and-tested-by:
  YunQiang Su wzss...@gmail.com Signed-off-by: Ben Hutchings
  b...@decadent.org.uk Cc: sta...@vger.kernel.org --- Unlike the
  previous version, this will apply cleanly to the media
  staging/for_v3.6 branch.
  
  Ben.
  
   drivers/media/rc/ite-cir.c |2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
  index 36fe5a3..24c77a4 100644
  --- a/drivers/media/rc/ite-cir.c
  +++ b/drivers/media/rc/ite-cir.c
  @@ -1473,6 +1473,7 @@ static int ite_probe(struct pnp_dev *pdev, const 
  struct pnp_device_id
  rdev = rc_allocate_device();
  if (!rdev)
  goto failure;
  +   itdev-rdev = rdev;
   
  ret = -ENODEV;
   
  @@ -1604,7 +1605,6 @@ static int ite_probe(struct pnp_dev *pdev, const 
  struct pnp_device_id
  if (ret)
  goto failure3;
   
  -   itdev-rdev = rdev;
  ite_pr(KERN_NOTICE, driver has been successfully loaded\n);
   
  return 0;
  
 

-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert Einstein


signature.asc
Description: This is a digitally signed message part


Re: [patch] [media] rc: divide by zero bugs in s_tx_carrier()

2012-08-19 Thread Ben Hutchings
On Sat, 2012-08-18 at 18:58 +0300, Dan Carpenter wrote:
 carrier comes from a get_user() in ir_lirc_ioctl().  We need to test
 that it's not zero before using it as a divisor.

Other RC drivers seem to have the same problem, only more deeply buried.
I think it's better to put this check in ir_lirc_ioctl() instead,
consistent with LIRC_SET_REC_CARRIER.

Ben.

 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
 
 diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
 index 647dd95..d05ac15 100644
 --- a/drivers/media/rc/ene_ir.c
 +++ b/drivers/media/rc/ene_ir.c
 @@ -881,10 +881,13 @@ static int ene_set_tx_mask(struct rc_dev *rdev, u32 
 tx_mask)
  static int ene_set_tx_carrier(struct rc_dev *rdev, u32 carrier)
  {
   struct ene_device *dev = rdev-priv;
 - u32 period = 200 / carrier;
 + u32 period;
  
   dbg(TX: attempt to set tx carrier to %d kHz, carrier);
 + if (carrier == 0)
 + return -EINVAL;
  
 + period = 200 / carrier;
   if (period  (period  ENE_CIRMOD_PRD_MAX ||
   period  ENE_CIRMOD_PRD_MIN)) {
  
 diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
 index 699eef3..2ea913a 100644
 --- a/drivers/media/rc/nuvoton-cir.c
 +++ b/drivers/media/rc/nuvoton-cir.c
 @@ -517,6 +517,9 @@ static int nvt_set_tx_carrier(struct rc_dev *dev, u32 
 carrier)
   struct nvt_dev *nvt = dev-priv;
   u16 val;
  
 + if (carrier == 0)
 + return -EINVAL;
 +
   nvt_cir_reg_write(nvt, 1, CIR_CP);
   val = 300 / (carrier) - 1;
   nvt_cir_reg_write(nvt, val  0xff, CIR_CC);
 

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.  It's the only way to be sure.


signature.asc
Description: This is a digitally signed message part


[PATCH] [media] rc: ite-cir: Initialise ite_dev::rdev earlier

2012-08-19 Thread Ben Hutchings
ite_dev::rdev is currently initialised in ite_probe() after
rc_register_device() returns.  If a newly registered device is opened
quickly enough, we may enable interrupts and try to use ite_dev::rdev
before it has been initialised.  Move it up to the earliest point we
can, right after calling rc_allocate_device().

References: http://bugs.debian.org/684441
Reported-and-tested-by: YunQiang Su wzss...@gmail.com
Signed-off-by: Ben Hutchings b...@decadent.org.uk
Cc: sta...@vger.kernel.org
---
 drivers/media/rc/ite-cir.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 0e49c99..c06992e 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1473,6 +1473,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct 
pnp_device_id
rdev = rc_allocate_device();
if (!rdev)
goto failure;
+   itdev-rdev = rdev;
 
ret = -ENODEV;
 
@@ -1604,7 +1605,6 @@ static int ite_probe(struct pnp_dev *pdev, const struct 
pnp_device_id
if (ret)
goto failure;
 
-   itdev-rdev = rdev;
ite_pr(KERN_NOTICE, driver has been successfully loaded\n);
 
return 0;



signature.asc
Description: This is a digitally signed message part


[PATCH v2] [media] rc: ite-cir: Initialise ite_dev::rdev earlier

2012-08-19 Thread Ben Hutchings
ite_dev::rdev is currently initialised in ite_probe() after
rc_register_device() returns.  If a newly registered device is opened
quickly enough, we may enable interrupts and try to use ite_dev::rdev
before it has been initialised.  Move it up to the earliest point we
can, right after calling rc_allocate_device().

References: http://bugs.debian.org/684441
Reported-and-tested-by: YunQiang Su wzss...@gmail.com
Signed-off-by: Ben Hutchings b...@decadent.org.uk
Cc: sta...@vger.kernel.org
---
Unlike the previous version, this will apply cleanly to the media
staging/for_v3.6 branch.

Ben.

 drivers/media/rc/ite-cir.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 36fe5a3..24c77a4 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1473,6 +1473,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct 
pnp_device_id
rdev = rc_allocate_device();
if (!rdev)
goto failure;
+   itdev-rdev = rdev;
 
ret = -ENODEV;
 
@@ -1604,7 +1605,6 @@ static int ite_probe(struct pnp_dev *pdev, const struct 
pnp_device_id
if (ret)
goto failure3;
 
-   itdev-rdev = rdev;
ite_pr(KERN_NOTICE, driver has been successfully loaded\n);
 
return 0;



signature.asc
Description: This is a digitally signed message part


Re: [PATCH for stable] cx25821: Remove bad strcpy to read-only char*

2012-07-29 Thread Ben Hutchings
On Tue, 2012-07-24 at 13:59 -0300, Ezequiel Garcia wrote:
 Hi Greg,
 
 This patch is already in Linus' tree and I really think it should go into 
 stable
 as well. You will find this bug in every kernel from the moment cx25821 went
 out of staging.
 
 I just read Documentation/stable_kernel_rules.txt, so I guess it was enough
 to add a tag Cc: sta...@vger.kernel.org in the patch (right?).
 Now I know it :-)
 
 If I'm doing anything wrong, just yell at me.
[...]

An upstream commit hash would have helped, but I found it anyway.
Queued up for 3.2.y.

Ben.

-- 
Ben Hutchings
It is impossible to make anything foolproof because fools are so ingenious.


signature.asc
Description: This is a digitally signed message part


Re: [git:v4l-dvb/for_v3.6] [media] gspca-core: Fix buffers staying in queued state after a stream_off

2012-06-28 Thread Ben Hutchings
On Mon, 2012-06-11 at 21:06 +0200, Mauro Carvalho Chehab wrote:
 This is an automatic generated email to let you know that the following patch 
 were queued at the 
 http://git.linuxtv.org/media_tree.git tree:
 
 Subject: [media] gspca-core: Fix buffers staying in queued state after a 
 stream_off
 Author:  Hans de Goede hdego...@redhat.com
 Date:Tue May 22 11:24:05 2012 -0300
 
 This fixes a regression introduced by commit f7059ea and should be
 backported to all supported stable kernels which have this commit.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com
 Tested-by: Antonio Ospite osp...@studenti.unina.it
 CC: sta...@vger.kernel.org
 Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com
[...]

This surely can't both be so important that it should go into stable
updates, yet so unimportant that it can wait for 3.6.

Ben.

-- 
Ben Hutchings
Lowery's Law:
 If it jams, force it. If it breaks, it needed replacing anyway.


signature.asc
Description: This is a digitally signed message part


[3.2-3.3 regression] mceusb: only every second keypress is recognised

2012-06-21 Thread Ben Hutchings
[Full bug log is at http://bugs.debian.org/677727.]

On Mon, 2012-06-18 at 15:20 +0200, Michael Schmitt wrote:
 Hi Ben,
 
 mschmitt@ganymed:~$ dmesg |head -3
 [0.00] Initializing cgroup subsys cpuset
 [0.00] Initializing cgroup subsys cpu
 [0.00] Linux version 3.3.0-rc6-686-pae (Debian 
 3.3~rc6-1~experimental.1) (debian-ker...@lists.debian.org) (gcc version 
 4.6.3 (Debian 4.6.3-1) ) #1 SMP Mon Mar 5 21:21:52 UTC 2012
 
 that is the first kernel I found on snapshot.d.o that does show that 
 issue. The next one backwards is linux-image-3.2.0-2-686-pae 
 (3.2.20-1) and that one works.
 
 Is there anything that comes to your mind?

No, but this version information should help to track down how the bug
was introduced.

Michael originally wrote:
 with the current kernel from experimental only every second keypress is
 recognized on my ir remote control. Reboot to kernel 3.2 from sid, all back to
 normal.
 I have no idea how the kernel could be responsible there... ok, a weird bug in
 the responsible kernel module for the remote, but somehow I doubt that.

The driver in question is mceusb.

Ben.

-- 
Ben Hutchings
Every program is either trivial or else contains at least one bug


signature.asc
Description: This is a digitally signed message part


Re: [PATCH 5/8] nuvoton-cir: Code cleanup: remove unused variable and function

2012-06-14 Thread Ben Hutchings
On Thu, Jun 14, 2012 at 02:58:13PM -0300, Peter Senna Tschudin wrote:
 Tested by compilation only.
[...]

I can't say whether this is correct since I never used the driver
either, but the function you remove is reading registers so it may
have important side-effects.

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
  - Albert Camus
--
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


Firmware blob in vs6624 driver

2012-05-21 Thread Ben Hutchings
The array vs6624_p1 is a list of bytes to write to the VS6624's
microcontroller registers/memory, written before it starts running code:

vs6624_writeregs(sd, vs6624_p1);
vs6624_write(sd, VS6624_MICRO_EN, 0x2);
vs6624_write(sd, VS6624_DIO_EN, 0x1);
mdelay(10);

This doesn't touch any of the documented registers, so presumably it's a
patch to the firmware loaded from non-volatile memory.  Unless you can
provide source code for the patch, this should go in the linux-firmware
repository and be loaded with request_firmware() instead of embedded in
the GPL driver source.

Also, shouldn't you check the loaded firmware version first to verify
that it's safe to apply the patch?

Ben.

-- 
Ben Hutchings
You can't have everything.  Where would you put it?


signature.asc
Description: This is a digitally signed message part


[PATCH] [media] rc: Fix invalid free_region and/or free_irq on probe failure

2012-05-14 Thread Ben Hutchings
fintek-cir, ite-cir and nuvoton-cir may try to free an I/O region
and/or IRQ handler that was never allocated after a failure in their
respective probe functions.  Add and use separate labels on the
failure path so they will do the right cleanup after each possible
point of failure.

Compile-tested only.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/rc/fintek-cir.c  |   13 ++---
 drivers/media/rc/ite-cir.c |   14 ++
 drivers/media/rc/nuvoton-cir.c |   26 --
 3 files changed, 24 insertions(+), 29 deletions(-)

diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index 4a3a238..6aabf7a 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -556,11 +556,11 @@ static int fintek_probe(struct pnp_dev *pdev, const 
struct pnp_device_id *dev_id
 
if (request_irq(fintek-cir_irq, fintek_cir_isr, IRQF_SHARED,
FINTEK_DRIVER_NAME, (void *)fintek))
-   goto failure;
+   goto failure2;
 
ret = rc_register_device(rdev);
if (ret)
-   goto failure;
+   goto failure3;
 
device_init_wakeup(pdev-dev, true);
fintek-rdev = rdev;
@@ -570,12 +570,11 @@ static int fintek_probe(struct pnp_dev *pdev, const 
struct pnp_device_id *dev_id
 
return 0;
 
+failure3:
+   free_irq(fintek-cir_irq, fintek);
+failure2:
+   release_region(fintek-cir_addr, fintek-cir_port_len);
 failure:
-   if (fintek-cir_irq)
-   free_irq(fintek-cir_irq, fintek);
-   if (fintek-cir_addr)
-   release_region(fintek-cir_addr, fintek-cir_port_len);
-
rc_free_device(rdev);
kfree(fintek);
 
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 0e49c99..36fe5a3 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1598,24 +1598,22 @@ static int ite_probe(struct pnp_dev *pdev, const struct 
pnp_device_id
 
if (request_irq(itdev-cir_irq, ite_cir_isr, IRQF_SHARED,
ITE_DRIVER_NAME, (void *)itdev))
-   goto failure;
+   goto failure2;
 
ret = rc_register_device(rdev);
if (ret)
-   goto failure;
+   goto failure3;
 
itdev-rdev = rdev;
ite_pr(KERN_NOTICE, driver has been successfully loaded\n);
 
return 0;
 
+failure3:
+   free_irq(itdev-cir_irq, itdev);
+failure2:
+   release_region(itdev-cir_addr, itdev-params.io_region_size);
 failure:
-   if (itdev-cir_irq)
-   free_irq(itdev-cir_irq, itdev);
-
-   if (itdev-cir_addr)
-   release_region(itdev-cir_addr, itdev-params.io_region_size);
-
rc_free_device(rdev);
kfree(itdev);
 
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 8b2c071..dc8a7dd 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -1075,19 +1075,19 @@ static int nvt_probe(struct pnp_dev *pdev, const struct 
pnp_device_id *dev_id)
 
if (request_irq(nvt-cir_irq, nvt_cir_isr, IRQF_SHARED,
NVT_DRIVER_NAME, (void *)nvt))
-   goto failure;
+   goto failure2;
 
if (!request_region(nvt-cir_wake_addr,
CIR_IOREG_LENGTH, NVT_DRIVER_NAME))
-   goto failure;
+   goto failure3;
 
if (request_irq(nvt-cir_wake_irq, nvt_cir_wake_isr, IRQF_SHARED,
NVT_DRIVER_NAME, (void *)nvt))
-   goto failure;
+   goto failure4;
 
ret = rc_register_device(rdev);
if (ret)
-   goto failure;
+   goto failure5;
 
device_init_wakeup(pdev-dev, true);
nvt-rdev = rdev;
@@ -1099,17 +1099,15 @@ static int nvt_probe(struct pnp_dev *pdev, const struct 
pnp_device_id *dev_id)
 
return 0;
 
+failure5:
+   free_irq(nvt-cir_wake_irq, nvt);
+failure4:
+   release_region(nvt-cir_wake_addr, CIR_IOREG_LENGTH);
+failure3:
+   free_irq(nvt-cir_irq, nvt);
+failure2:
+   release_region(nvt-cir_addr, CIR_IOREG_LENGTH);
 failure:
-   if (nvt-cir_irq)
-   free_irq(nvt-cir_irq, nvt);
-   if (nvt-cir_addr)
-   release_region(nvt-cir_addr, CIR_IOREG_LENGTH);
-
-   if (nvt-cir_wake_irq)
-   free_irq(nvt-cir_wake_irq, nvt);
-   if (nvt-cir_wake_addr)
-   release_region(nvt-cir_wake_addr, CIR_IOREG_LENGTH);
-
rc_free_device(rdev);
kfree(nvt);
 
-- 
1.7.10


--
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] [media] rc: Fix invalid free_region and/or free_irq on probe failure

2012-05-14 Thread Ben Hutchings
On Tue, 2012-05-15 at 02:36 +0100, Ben Hutchings wrote:
 fintek-cir, ite-cir and nuvoton-cir may try to free an I/O region
 and/or IRQ handler that was never allocated after a failure in their
 respective probe functions.  Add and use separate labels on the
 failure path so they will do the right cleanup after each possible
 point of failure.
 
 Compile-tested only.
 
 Signed-off-by: Ben Hutchings b...@decadent.org.uk

And this should probably go to stable as well, if you agree it's a valid
fix.

Ben.

 ---
  drivers/media/rc/fintek-cir.c  |   13 ++---
  drivers/media/rc/ite-cir.c |   14 ++
  drivers/media/rc/nuvoton-cir.c |   26 --
  3 files changed, 24 insertions(+), 29 deletions(-)
 
 diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
 index 4a3a238..6aabf7a 100644
 --- a/drivers/media/rc/fintek-cir.c
 +++ b/drivers/media/rc/fintek-cir.c
 @@ -556,11 +556,11 @@ static int fintek_probe(struct pnp_dev *pdev, const 
 struct pnp_device_id *dev_id
  
   if (request_irq(fintek-cir_irq, fintek_cir_isr, IRQF_SHARED,
   FINTEK_DRIVER_NAME, (void *)fintek))
 - goto failure;
 + goto failure2;
  
   ret = rc_register_device(rdev);
   if (ret)
 - goto failure;
 + goto failure3;
  
   device_init_wakeup(pdev-dev, true);
   fintek-rdev = rdev;
 @@ -570,12 +570,11 @@ static int fintek_probe(struct pnp_dev *pdev, const 
 struct pnp_device_id *dev_id
  
   return 0;
  
 +failure3:
 + free_irq(fintek-cir_irq, fintek);
 +failure2:
 + release_region(fintek-cir_addr, fintek-cir_port_len);
  failure:
 - if (fintek-cir_irq)
 - free_irq(fintek-cir_irq, fintek);
 - if (fintek-cir_addr)
 - release_region(fintek-cir_addr, fintek-cir_port_len);
 -
   rc_free_device(rdev);
   kfree(fintek);
  
 diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
 index 0e49c99..36fe5a3 100644
 --- a/drivers/media/rc/ite-cir.c
 +++ b/drivers/media/rc/ite-cir.c
 @@ -1598,24 +1598,22 @@ static int ite_probe(struct pnp_dev *pdev, const 
 struct pnp_device_id
  
   if (request_irq(itdev-cir_irq, ite_cir_isr, IRQF_SHARED,
   ITE_DRIVER_NAME, (void *)itdev))
 - goto failure;
 + goto failure2;
  
   ret = rc_register_device(rdev);
   if (ret)
 - goto failure;
 + goto failure3;
  
   itdev-rdev = rdev;
   ite_pr(KERN_NOTICE, driver has been successfully loaded\n);
  
   return 0;
  
 +failure3:
 + free_irq(itdev-cir_irq, itdev);
 +failure2:
 + release_region(itdev-cir_addr, itdev-params.io_region_size);
  failure:
 - if (itdev-cir_irq)
 - free_irq(itdev-cir_irq, itdev);
 -
 - if (itdev-cir_addr)
 - release_region(itdev-cir_addr, itdev-params.io_region_size);
 -
   rc_free_device(rdev);
   kfree(itdev);
  
 diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
 index 8b2c071..dc8a7dd 100644
 --- a/drivers/media/rc/nuvoton-cir.c
 +++ b/drivers/media/rc/nuvoton-cir.c
 @@ -1075,19 +1075,19 @@ static int nvt_probe(struct pnp_dev *pdev, const 
 struct pnp_device_id *dev_id)
  
   if (request_irq(nvt-cir_irq, nvt_cir_isr, IRQF_SHARED,
   NVT_DRIVER_NAME, (void *)nvt))
 - goto failure;
 + goto failure2;
  
   if (!request_region(nvt-cir_wake_addr,
   CIR_IOREG_LENGTH, NVT_DRIVER_NAME))
 - goto failure;
 + goto failure3;
  
   if (request_irq(nvt-cir_wake_irq, nvt_cir_wake_isr, IRQF_SHARED,
   NVT_DRIVER_NAME, (void *)nvt))
 - goto failure;
 + goto failure4;
  
   ret = rc_register_device(rdev);
   if (ret)
 - goto failure;
 + goto failure5;
  
   device_init_wakeup(pdev-dev, true);
   nvt-rdev = rdev;
 @@ -1099,17 +1099,15 @@ static int nvt_probe(struct pnp_dev *pdev, const 
 struct pnp_device_id *dev_id)
  
   return 0;
  
 +failure5:
 + free_irq(nvt-cir_wake_irq, nvt);
 +failure4:
 + release_region(nvt-cir_wake_addr, CIR_IOREG_LENGTH);
 +failure3:
 + free_irq(nvt-cir_irq, nvt);
 +failure2:
 + release_region(nvt-cir_addr, CIR_IOREG_LENGTH);
  failure:
 - if (nvt-cir_irq)
 - free_irq(nvt-cir_irq, nvt);
 - if (nvt-cir_addr)
 - release_region(nvt-cir_addr, CIR_IOREG_LENGTH);
 -
 - if (nvt-cir_wake_irq)
 - free_irq(nvt-cir_wake_irq, nvt);
 - if (nvt-cir_wake_addr)
 - release_region(nvt-cir_wake_addr, CIR_IOREG_LENGTH);
 -
   rc_free_device(rdev);
   kfree(nvt);
  

-- 
Ben Hutchings
The two most common things in the universe are hydrogen and stupidity.


signature.asc
Description: This is a digitally signed message part


Re: [PATCH 3.0.y 0/4] Re: lirc_serial spuriously claims assigned port and irq to be in use

2012-03-07 Thread Ben Hutchings
On Wed, Mar 07, 2012 at 12:04:07PM -0800, Greg Kroah-Hartman wrote:
 On Fri, Mar 02, 2012 at 02:39:13PM -0600, Jonathan Nieder wrote:
  Ben Hutchings wrote:
   On Thu, 2012-03-01 at 21:45 -0600, Jonathan Nieder wrote:
  
   Would some of these patches (e.g., at least patches 1, 2, and 5) be
   appropriate for inclusion in the 3.0.y and 3.2.y stable kernels from
   kernel.org?
  
   Assuming they haven't caused any regressions, I think everything except
   9b98d6067971 (4/5) would be appropriate.
  
  Great.  Here are the aforementioned patches rebased against 3.0.y, in
  the hope that some interested person can confirm they still work.  The
  only backporting needed was to adjust to the lack of
  drivers/staging/lirc - drivers/staging/media/lirc renaming.
 
 So they should also go to 3.2-stable, right?
 
Yes, only for 3.2 a simple cherry-pick should work.

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
  - Albert Camus
--
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 1/5] staging: lirc_serial: Fix init/exit order

2012-03-01 Thread Ben Hutchings
On Thu, 2012-03-01 at 21:45 -0600, Jonathan Nieder wrote:
[...]
 From http://bugs.debian.org/645811 I see that you tested these patches:
 
  affc9a0d59ac [media] staging: lirc_serial: Do not assume error codes
   returned by request_irq()
  9b98d6067971 [media] staging: lirc_serial: Fix bogus error codes
  1ff1d88e8629 [media] staging: lirc_serial: Fix deadlock on resume failure
  c8e57e1b766c [media] staging: lirc_serial: Free resources on failure
   paths of lirc_serial_probe()
  9105b8b20041 [media] staging: lirc_serial: Fix init/exit order
 
 in a VM.  They were applied in 3.3-rc1 and have been in the Debian
 kernel since 3.1.4-1 at the end of November.
 
 Would some of these patches (e.g., at least patches 1, 2, and 5) be
 appropriate for inclusion in the 3.0.y and 3.2.y stable kernels from
 kernel.org?

Assuming they haven't caused any regressions, I think everything except
9b98d6067971 (4/5) would be appropriate.

Ben.

-- 
Ben Hutchings
One of the nice things about standards is that there are so many of them.


signature.asc
Description: This is a digitally signed message part


Re: Bug#655109: linux-2.6: BUG in videobuf-core triggered by mplayer on HVR-1300

2012-01-08 Thread Ben Hutchings
:12:52 saturn kernel: [ 1623.656264] Process mplayer (pid: 8039, 
 threadinfo 8801f2a02000, task 88022319efa0)
 Jan  8 17:12:52 saturn kernel: [ 1623.656281] Stack:
 Jan  8 17:12:52 saturn kernel: [ 1623.656288]  a02d97d3 
 8801f2a03db0  880223191000
 Jan  8 17:12:52 saturn kernel: [ 1623.656314]  a05a38a0 
 8801b40ad680 a046ab55 001f
 Jan  8 17:12:52 saturn kernel: [ 1623.656340]  0030 
 88022fffcc08 0002 
 Jan  8 17:12:52 saturn kernel: [ 1623.656367] Call Trace:
 Jan  8 17:12:52 saturn kernel: [ 1623.656384]  [a02d97d3] ? 
 videobuf_qbuf+0x2e1/0x3cd [videobuf_core]
 Jan  8 17:12:52 saturn kernel: [ 1623.656409]  [a046ab55] ? 
 __video_do_ioctl+0x1857/0x3cee [videodev]
 Jan  8 17:12:52 saturn kernel: [ 1623.656430]  [a05a155b] ? 
 vidioc_dqbuf+0x18/0x18 [cx88_blackbird]
 Jan  8 17:12:52 saturn kernel: [ 1623.656451]  [810b6d89] ? 
 __alloc_pages_nodemask+0x6e0/0x748
 Jan  8 17:12:52 saturn kernel: [ 1623.656470]  [8103539b] ? 
 should_resched+0x5/0x23
 Jan  8 17:12:52 saturn kernel: [ 1623.656487]  [810f0961] ? 
 lookup_page_cgroup+0x2d/0x42
 Jan  8 17:12:52 saturn kernel: [ 1623.656504]  [810ec570] ? 
 mem_cgroup_update_page_stat+0x17/0xd4
 Jan  8 17:12:52 saturn kernel: [ 1623.656521]  [8103539b] ? 
 should_resched+0x5/0x23
 Jan  8 17:12:52 saturn kernel: [ 1623.656536]  [810ee6ab] ? 
 mem_cgroup_get_reclaim_stat_from_page+0xd/0x52
 Jan  8 17:12:52 saturn kernel: [ 1623.656554]  [810b8b74] ? 
 update_page_reclaim_stat+0x17/0x44
 Jan  8 17:12:52 saturn kernel: [ 1623.656576]  [a0469009] ? 
 video_usercopy+0x2e8/0x3a6 [videodev]
 Jan  8 17:12:52 saturn kernel: [ 1623.656599]  [a04692fe] ? 
 v4l_print_ext_ctrls.part.3+0xac/0xac [videodev]
 Jan  8 17:12:52 saturn kernel: [ 1623.656620]  [810c308d] ? 
 vma_prio_tree_insert+0x1d/0x35
 Jan  8 17:12:52 saturn kernel: [ 1623.656641]  [a04682d9] ? 
 v4l2_ioctl+0xe0/0x10e [videodev]
 Jan  8 17:12:52 saturn kernel: [ 1623.656658]  [81100fc0] ? 
 do_vfs_ioctl+0x452/0x493
 Jan  8 17:12:52 saturn kernel: [ 1623.656673]  [8103539b] ? 
 should_resched+0x5/0x23
 Jan  8 17:12:52 saturn kernel: [ 1623.656688]  [8110104c] ? 
 sys_ioctl+0x4b/0x6f
 Jan  8 17:12:52 saturn kernel: [ 1623.656704]  [813327d2] ? 
 system_call_fastpath+0x16/0x1b
 Jan  8 17:12:52 saturn kernel: [ 1623.656717] Code: a0 7e 10 eb d6 48 8d bb 
 70 01 00 00 31 ed e8 6c fe ff ff 48 89 df e8 67 fb ff ff 48 83 c4 18 89 e8 5b 
 5d c3 8b 47 5c 85 c0 75 02 0f 0b 83 f8 07 75 1c 83 7f 60 02 75 0a c7 47 60 
 03 00 00 00 b0 
 Jan  8 17:12:52 saturn kernel: [ 1623.656904] RIP  [a02d94ce] 
 videobuf_next_field+0x7/0x2b [videobuf_core]
 Jan  8 17:12:52 saturn kernel: [ 1623.656928]  RSP 8801f2a03b60
 Jan  8 17:12:52 saturn kernel: [ 1623.664167] ---[ end trace 4977f1ea86d5af7d 
 ]---
 
 
 I've experienced this bug with previous kernel versions as well but didn't 
 report it before.

Do you remember which was the first version where this bug appeared?

Ben.

 Here's the dmesg output from a boot of the system:
[removed; see http://bugs.debian.org/655109]

-- 
Ben Hutchings
Life is what happens to you while you're busy making other plans.
   - John Lennon


signature.asc
Description: This is a digitally signed message part


[PATCH 1/5] staging: lirc_serial: Fix init/exit order

2011-11-15 Thread Ben Hutchings
Currently the module init function registers a platform_device and
only then allocates its IRQ and I/O region.  This allows allocation to
race with the device's suspend() function.  Instead, allocate
resources in the platform driver's probe() function and free them in
the remove() function.

The module exit function removes the platform device before the
character device that provides access to it.  Change it to reverse the
order of initialisation.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
The down-side of this is that module insertion now succeeds even if the
device can't be probed.  But that's how most driver modules work, and
there will be obvious error messages logged on failure.

Ben.

 drivers/staging/media/lirc/lirc_serial.c |   56 +++--
 1 files changed, 21 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_serial.c 
b/drivers/staging/media/lirc/lirc_serial.c
index 8a060a8..8637631 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -836,7 +836,7 @@ static int hardware_init_port(void)
return 0;
 }
 
-static int init_port(void)
+static int __devinit lirc_serial_probe(struct platform_device *dev)
 {
int i, nlow, nhigh, result;
 
@@ -913,6 +913,18 @@ static int init_port(void)
return 0;
 }
 
+static int __devexit lirc_serial_remove(struct platform_device *dev)
+{
+   free_irq(irq, (void *)hardware);
+
+   if (iommap != 0)
+   release_mem_region(iommap, 8  ioshift);
+   else
+   release_region(io, 8);
+
+   return 0;
+}
+
 static int set_use_inc(void *data)
 {
unsigned long flags;
@@ -1076,16 +1088,6 @@ static struct lirc_driver driver = {
 
 static struct platform_device *lirc_serial_dev;
 
-static int __devinit lirc_serial_probe(struct platform_device *dev)
-{
-   return 0;
-}
-
-static int __devexit lirc_serial_remove(struct platform_device *dev)
-{
-   return 0;
-}
-
 static int lirc_serial_suspend(struct platform_device *dev,
   pm_message_t state)
 {
@@ -1188,10 +1190,6 @@ static int __init lirc_serial_init_module(void)
 {
int result;
 
-   result = lirc_serial_init();
-   if (result)
-   return result;
-
switch (type) {
case LIRC_HOMEBREW:
case LIRC_IRDEO:
@@ -1211,8 +1209,7 @@ static int __init lirc_serial_init_module(void)
break;
 #endif
default:
-   result = -EINVAL;
-   goto exit_serial_exit;
+   return -EINVAL;
}
if (!softcarrier) {
switch (type) {
@@ -1228,37 +1225,26 @@ static int __init lirc_serial_init_module(void)
}
}
 
-   result = init_port();
-   if (result  0)
-   goto exit_serial_exit;
+   result = lirc_serial_init();
+   if (result)
+   return result;
+
driver.features = hardware[type].features;
driver.dev = lirc_serial_dev-dev;
driver.minor = lirc_register_driver(driver);
if (driver.minor  0) {
printk(KERN_ERR  LIRC_DRIVER_NAME
   : register_chrdev failed!\n);
-   result = -EIO;
-   goto exit_release;
+   lirc_serial_exit();
+   return -EIO;
}
return 0;
-exit_release:
-   release_region(io, 8);
-exit_serial_exit:
-   lirc_serial_exit();
-   return result;
 }
 
 static void __exit lirc_serial_exit_module(void)
 {
-   lirc_serial_exit();
-
-   free_irq(irq, (void *)hardware);
-
-   if (iommap != 0)
-   release_mem_region(iommap, 8  ioshift);
-   else
-   release_region(io, 8);
lirc_unregister_driver(driver.minor);
+   lirc_serial_exit();
dprintk(cleaned up module\n);
 }
 
-- 
1.7.7.2



--
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 2/5] staging: lirc_serial: Free resources on failure paths of lirc_serial_probe()

2011-11-15 Thread Ben Hutchings
Failure to allocate the I/O region leaves the IRQ allocated.
A later failure leaves them both allocated.

Reported-by: Torsten Crass torsten.cr...@ebiology.de
References: http://bugs.debian.org/645811
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/lirc_serial.c |   19 ---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_serial.c 
b/drivers/staging/media/lirc/lirc_serial.c
index 8637631..d833772 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -875,11 +875,14 @@ static int __devinit lirc_serial_probe(struct 
platform_device *dev)
   : or compile the serial port driver as module and\n);
printk(KERN_WARNING LIRC_DRIVER_NAME
   : make sure this module is loaded first\n);
-   return -EBUSY;
+   result = -EBUSY;
+   goto exit_free_irq;
}
 
-   if (hardware_init_port()  0)
-   return -EINVAL;
+   if (hardware_init_port()  0) {
+   result = -EINVAL;
+   goto exit_release_region;
+   }
 
/* Initialize pulse/space widths */
init_timing_params(duty_cycle, freq);
@@ -911,6 +914,16 @@ static int __devinit lirc_serial_probe(struct 
platform_device *dev)
 
dprintk(Interrupt %d, port %04x obtained\n, irq, io);
return 0;
+
+exit_release_region:
+   if (iommap != 0)
+   release_mem_region(iommap, 8  ioshift);
+   else
+   release_region(io, 8);
+exit_free_irq:
+   free_irq(irq, (void *)hardware);
+
+   return result;
 }
 
 static int __devexit lirc_serial_remove(struct platform_device *dev)
-- 
1.7.7.2



--
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 3/5] staging: lirc_serial: Fix deadlock on resume failure

2011-11-15 Thread Ben Hutchings
A resume function cannot remove the device it is resuming!

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
I haven't seen any report of this deadlock, but it seems pretty obvious.

Ben.

 drivers/staging/media/lirc/lirc_serial.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_serial.c 
b/drivers/staging/media/lirc/lirc_serial.c
index d833772..befe626 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -1127,10 +1127,8 @@ static int lirc_serial_resume(struct platform_device 
*dev)
 {
unsigned long flags;
 
-   if (hardware_init_port()  0) {
-   lirc_serial_exit();
+   if (hardware_init_port()  0)
return -EINVAL;
-   }
 
spin_lock_irqsave(hardware[type].lock, flags);
/* Enable Interrupt */
-- 
1.7.7.2



--
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 4/5] staging: lirc_serial: Fix bogus error codes

2011-11-15 Thread Ben Hutchings
Device not found?  ENODEV, not EINVAL.
Write to read-only device?  EPERM, not EBADF.
Invalid argument?  EINVAL, not ENOSYS.
Unsupported ioctl?  ENOIOCTLCMD, not ENOSYS.
Another function returned an error code?  Use that, don't replace it.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/lirc_serial.c |   23 ---
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_serial.c 
b/drivers/staging/media/lirc/lirc_serial.c
index befe626..6f5257e 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -773,7 +773,7 @@ static int hardware_init_port(void)
/* we fail, there's nothing here */
printk(KERN_ERR LIRC_DRIVER_NAME : port existence test 
   failed, cannot continue\n);
-   return -EINVAL;
+   return -ENODEV;
}
 

@@ -879,10 +879,9 @@ static int __devinit lirc_serial_probe(struct 
platform_device *dev)
goto exit_free_irq;
}
 
-   if (hardware_init_port()  0) {
-   result = -EINVAL;
+   result = hardware_init_port();
+   if (result  0)
goto exit_release_region;
-   }
 
/* Initialize pulse/space widths */
init_timing_params(duty_cycle, freq);
@@ -980,7 +979,7 @@ static ssize_t lirc_write(struct file *file, const char 
*buf,
int *wbuf;
 
if (!(hardware[type].features  LIRC_CAN_SEND_PULSE))
-   return -EBADF;
+   return -EPERM;
 
count = n / sizeof(int);
if (n % sizeof(int) || count % 2 == 0)
@@ -1031,11 +1030,11 @@ static long lirc_ioctl(struct file *filep, unsigned int 
cmd, unsigned long arg)
return result;
/* only LIRC_MODE_PULSE supported */
if (value != LIRC_MODE_PULSE)
-   return -ENOSYS;
+   return -EINVAL;
break;
 
case LIRC_GET_LENGTH:
-   return -ENOSYS;
+   return -ENOIOCTLCMD;
break;
 
case LIRC_SET_SEND_DUTY_CYCLE:
@@ -1126,9 +1125,11 @@ static void lirc_serial_exit(void);
 static int lirc_serial_resume(struct platform_device *dev)
 {
unsigned long flags;
+   int result;
 
-   if (hardware_init_port()  0)
-   return -EINVAL;
+   result = hardware_init_port();
+   if (result  0)
+   return result;
 
spin_lock_irqsave(hardware[type].lock, flags);
/* Enable Interrupt */
@@ -1161,7 +1162,7 @@ static int __init lirc_serial_init(void)
/* Init read buffer. */
result = lirc_buffer_init(rbuf, sizeof(int), RBUF_LEN);
if (result  0)
-   return -ENOMEM;
+   return result;
 
result = platform_driver_register(lirc_serial_driver);
if (result) {
@@ -1247,7 +1248,7 @@ static int __init lirc_serial_init_module(void)
printk(KERN_ERR  LIRC_DRIVER_NAME
   : register_chrdev failed!\n);
lirc_serial_exit();
-   return -EIO;
+   return driver.minor;
}
return 0;
 }
-- 
1.7.7.2



--
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 5/5] staging: lirc_serial: Do not assume error codes returned by request_irq()

2011-11-15 Thread Ben Hutchings
lirc_serial_probe() must fail if request_irq() returns an error, even if
it isn't EBUSY or EINVAL,

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/staging/media/lirc/lirc_serial.c |   21 +
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_serial.c 
b/drivers/staging/media/lirc/lirc_serial.c
index 6f5257e..0ca308a 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -843,18 +843,15 @@ static int __devinit lirc_serial_probe(struct 
platform_device *dev)
result = request_irq(irq, irq_handler,
 (share_irq ? IRQF_SHARED : 0),
 LIRC_DRIVER_NAME, (void *)hardware);
-
-   switch (result) {
-   case -EBUSY:
-   printk(KERN_ERR LIRC_DRIVER_NAME : IRQ %d busy\n, irq);
-   return -EBUSY;
-   case -EINVAL:
-   printk(KERN_ERR LIRC_DRIVER_NAME
-  : Bad irq number or handler\n);
-   return -EINVAL;
-   default:
-   break;
-   };
+   if (result  0) {
+   if (result == -EBUSY)
+   printk(KERN_ERR LIRC_DRIVER_NAME : IRQ %d busy\n,
+  irq);
+   else if (result == -EINVAL)
+   printk(KERN_ERR LIRC_DRIVER_NAME
+  : Bad irq number or handler\n);
+   return result;
+   }
 
/* Reserve io region. */
/*
-- 
1.7.7.2


--
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: Bug#639161: linux-image-3.0.0-1-686-pae: Upgrade 2.6.39 - 3.0.0 breaks playback on DiBcom 7000PC

2011-08-24 Thread Ben Hutchings
Patrick,

Please could you take a look at the following bug report on Linux 3.0 as
packaged in Debian.

Ben.

On Wed, 2011-08-24 at 18:59 +0200, Soeren D. Schulze wrote:
 Package: linux-2.6
 Version: 3.0.0-1
 Severity: normal
 
 I usually use tzap/mplayer for TV playback.
 
 After the upgrade to Linux 3.0.0, tzap command line output still looks
 fine, but mplayer does not seem to receive any data (its cache does not
 fill up).
 
 syslog/dmesg output looks the same as in 2.6.39.  On the first try to
 tune, dmesg receives:
 
 dib0700: tx buffer length is larger than 4. Not supported.
 (for which I find various non-Debian bug reports)
 
 But that does not seem to be the issue, because the same message appears
 in 2.6.39, where everything is fine.
 So I do not really have an idea what the problem is, but I certainly
 know that it's a regression, because simply booting Linux 2.6.39 rather
 than 3.0.0 on the same system avoids the problem.
 
 -- Package-specific info:
 ** Version:
 Linux version 3.0.0-1-686-pae (Debian 3.0.0-1) (b...@decadent.org.uk)
 (gcc version 4.5.3 (Debian 4.5.3-3) ) #1 SMP Sun Jul 24 14:27:32 UTC 2011
 
 ** Command line:
 BOOT_IMAGE=/vmlinuz-3.0.0-1-686-pae
 root=UUID=3aa0a731-df46-486e-9c1e-258723e14f8f ro
 
 ** Not tainted
 
 ** Kernel log:
 [   11.031446] saa7134:   card=172 - RoverMedia TV Link Pro FM
19d1:0138
 [   11.031580] saa7134:   card=173 - Zolid Hybrid TV Tuner PCI
1131:2004
 [   11.031713] saa7134:   card=174 - Asus Europa Hybrid OEM
1043:4847
 [   11.031847] saa7134:   card=175 - Leadtek Winfast DTV1000S
107d:6655
 [   11.031982] saa7134:   card=176 - Beholder BeholdTV 505 RDS
:5051
 [   11.032126] saa7134:   card=177 - Hawell HW-404M7
 
 [   11.032217] saa7134:   card=178 - Beholder BeholdTV H7
5ace:7190
 [   11.032351] saa7134:   card=179 - Beholder BeholdTV A7
5ace:7090
 [   11.032485] saa7134:   card=180 - Avermedia PCI M733A
1461:4155 1461:4255
 [   11.032656] saa7134:   card=181 - TechoTrend TT-budget T-3000
13c2:2804
 [   11.032789] saa7134:   card=182 - Kworld PCI SBTVD/ISDB-T Full-Seg
 Hybrid  17de:b136
 [   11.032923] saa7134:   card=183 - Compro VideoMate Vista M1F
185b:c900
 [   11.033057] saa7134:   card=184 - Encore ENLTV-FM 3
1a7f:2108
 [   11.033192] saa7134:   card=185 - MagicPro ProHDTV Pro2
 DMB-TH/Hybrid  17de:d136
 [   11.033326] saa7134:   card=186 - Beholder BeholdTV 501
5ace:5010
 [   11.033460] saa7134:   card=187 - Beholder BeholdTV 503 FM
5ace:5030
 [   11.033596] saa7134[0]: subsystem: 1131:, board: UNKNOWN/GENERIC
 [card=0,autodetected]
 [   11.075242] IR NEC protocol handler initialized
 [   11.265597] saa7134[0]: board init: gpio is 10020
 [   11.368582] saa7134[0]: Huh, no eeprom present (err=-5)?
 [   11.381924] saa7134[0]: registered device video0 [v4l2]
 [   11.382055] saa7134[0]: registered device vbi0
 [   11.417515] IR RC5(x) protocol handler initialized
 [   11.607051] cfg80211: Calling CRDA to update world regulatory domain
 [   11.995773] IR RC6 protocol handler initialized
 [   12.191500] IR JVC protocol handler initialized
 [   12.263839] dib0700: loaded with support for 20 different device-types
 [   12.264209] dvb-usb: found a 'Hauppauge Nova-T Stick' in warm state.
 [   12.265499] dvb-usb: will pass the complete MPEG2 transport stream to
 the software demuxer.
 [   12.266158] DVB: registering new adapter (Hauppauge Nova-T Stick)
 [   12.517093] DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)...
 [   12.609760] IR Sony protocol handler initialized
 [   12.790869] DiB0070: successfully identified
 [   12.907896] ACPI: PCI Interrupt Link [ALKC] enabled at IRQ 22
 [   12.907988] VIA 82xx Audio :00:11.5: PCI INT C - Link[ALKC] -
 GSI 22 (level, low) - IRQ 22
 [   12.908316] VIA 82xx Audio :00:11.5: setting latency timer to 64
 [   12.932675] saa7134 ALSA driver for DMA sound loaded
 [   12.932807] saa7134[0]/alsa: saa7134[0] at 0xfdffc000 irq 16
 registered as card -1
 [   12.948789] lirc_dev: IR Remote Control driver registered, major 249
 [   12.952109] IR LIRC bridge handler initialized
 [   13.380033] Registered IR keymap rc-dib0700-rc5
 [   13.380514] input: IR-receiver inside an USB DVB receiver as
 /devices/pci:00/:00:10.4/usb1/1-1/1-1.3/rc/rc0/input6
 [   13.380749] rc0: IR-receiver inside an USB DVB receiver as
 /devices/pci:00/:00:10.4/usb1/1-1/1-1.3/rc/rc0
 [   13.382312] dvb-usb: schedule remote query interval to 50 msecs.
 [   13.382385] dvb-usb: Hauppauge Nova-T Stick successfully initialized
 and connected.
 [   13.382931] dib0700: rc submit urb failed
 [   13.382935]
 [   13.383099] usbcore: registered new interface driver dvb_usb_dib0700
 [   13.530512] ENS1371 :00:14.0: PCI INT A - GSI 17 (level, low) -
 IRQ 17
 [   14.848088] usb 1-1.1: ath9k_htc: Transferred FW: htc_9271.fw, size:
 51272
 [   15.061785] ath9k_htc 1-1.1:1.0: ath9k_htc: HTC initialized with 33
 credits

Re: [PATCH 07/19] timberdale: mfd_cell is now implicitly available to drivers

2011-04-06 Thread Ben Hutchings
On Wed, 2011-04-06 at 19:05 +0200, Samuel Ortiz wrote:
 Hi Greg,
 
 On Wed, Apr 06, 2011 at 08:58:05AM -0700, Greg KH wrote:
  On Wed, Apr 06, 2011 at 05:23:23PM +0200, Samuel Ortiz wrote:
   --- a/include/linux/device.h
   +++ b/include/linux/device.h
   @@ -33,6 +33,7 @@ struct class;
struct subsys_private;
struct bus_type;
struct device_node;
   +struct mfd_cell;

struct bus_attribute {
 struct attributeattr;
   @@ -444,6 +445,8 @@ struct device {
 struct device_node  *of_node; /* associated device tree node */
 const struct of_device_id *of_match; /* matching of_device_id from 
   driver */

   + struct mfd_cell *mfd_cell; /* MFD cell pointer */
   +
  
  What is a MFD cell pointer and why is it needed in struct device?
 An MFD cell is an MFD instantiated device.
 MFD (Multi Function Device) drivers instantiate platform devices. Those
 devices drivers sometimes need a platform data pointer, sometimes an MFD
 specific pointer, and sometimes both. Also, some of those drivers have been
 implemented as MFD sub drivers, while others know nothing about MFD and just
 expect a plain platform_data pointer.
 
 We've been faced with the problem of being able to pass both MFD related data
 and a platform_data pointer to some of those drivers. Squeezing the MFD bits
 in the sub driver platform_data pointer doesn't work for drivers that know
 nothing about MFDs. It also adds an additional dependency on the MFD API to
 all MFD sub drivers. That prevents any of those drivers to eventually be used
 as plain platform device drivers.
 So, adding an MFD cell pointer to the device structure allows us to cleanly
 pass both pieces of information, while keeping all the MFD sub drivers
 independant from the MFD core if they want/can.

Why isn't an MFD the parent of its component devices?

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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 07/19] timberdale: mfd_cell is now implicitly available to drivers

2011-04-06 Thread Ben Hutchings
On Wed, 2011-04-06 at 19:51 +0200, Samuel Ortiz wrote:
 Hi Ben,
 
 On Wed, Apr 06, 2011 at 06:16:49PM +0100, Ben Hutchings wrote:
   So, adding an MFD cell pointer to the device structure allows us to 
   cleanly
   pass both pieces of information, while keeping all the MFD sub drivers
   independant from the MFD core if they want/can.
  
  Why isn't an MFD the parent of its component devices?
 It actually is. How would that help here ?

I was thinking you could encode the component address in the
platform_device name (just as the bus address is the name of a normal
bus device).  That plus the parent device pointer would be sufficient
information to look up the mfd_cell.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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: [RFC/PATCH 0/3] locking fixes for cx88

2011-04-02 Thread Ben Hutchings
On Sat, 2011-04-02 at 04:38 -0500, Jonathan Nieder wrote:
 Hi,
 
 Huber Andreas wrote[1]:
 
  Processes that try to open a cx88-blackbird driven MPEG device will hang up.
 
 Here's a possible fix based on a patch by Ben Hutchings and
 corrections from Andi Huber.  Warning: probably full of mistakes (my
 fault) since I'm not familiar with any of this stuff.  Untested.
 Review and testing would be welcome.

Since you have split up and otherwise modified the patch I sent, please
remove the 'From' and 'Signed-off-by' lines with my name and address.
Just state that the patches are based on my work.

Ben.

 Ben Hutchings (2):
   [media] cx88: fix locking of sub-driver operations
   [media] cx88: use a mutex to protect cx8802_devlist
 
 Jonathan Nieder (1):
   [media] cx88: protect per-device driver list with device lock
 
  drivers/media/video/cx88/cx88-blackbird.c |3 +-
  drivers/media/video/cx88/cx88-dvb.c   |2 +
  drivers/media/video/cx88/cx88-mpeg.c  |   35 +++-
  drivers/media/video/cx88/cx88.h   |   10 +++-
  4 files changed, 37 insertions(+), 13 deletions(-)
 

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.


signature.asc
Description: This is a digitally signed message part


[PATCH] DVB/V4L: Fix Kconfig select/depend conflicts

2010-12-04 Thread Ben Hutchings
The selection of 'helper' drivers for peripheral chips can be done
either automatically by the config entry for the controller chip in a
device (default if !EMBEDDED) or manually if the user knows exactly
which peripheral chips are used.

The config entries for these helper drivers are completely hidden if
automatic selection is enabled.  However, the way that this is
currently done results in a config dependency on manual selection, so
Kconfig now warns of symbols being auto-selected without their
dependencies being met.

This changes all those config entries so that only their visibility
depends on manual selection being enabled.  It also necessarily
removes some explicit menus, since explicit menus always result in a
config dependency.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
Mauro, please try to get this included in 2.6.37.  Now that Kconfig
warns about such conflicts, it results in an enormous amount of noise in
an all-modules config.

Ben.

 drivers/media/common/tuners/Kconfig |   61 ++
 drivers/media/dvb/frontends/Kconfig |  245 ++-
 drivers/media/video/Kconfig |  138 +---
 drivers/media/video/cx25840/Kconfig |3 +-
 4 files changed, 287 insertions(+), 160 deletions(-)

diff --git a/drivers/media/common/tuners/Kconfig 
b/drivers/media/common/tuners/Kconfig
index 2385e6c..adac6cf 100644
--- a/drivers/media/common/tuners/Kconfig
+++ b/drivers/media/common/tuners/Kconfig
@@ -44,10 +44,9 @@ menuconfig MEDIA_TUNER_CUSTOMISE
 
  If unsure say N.
 
-if MEDIA_TUNER_CUSTOMISE
-
 config MEDIA_TUNER_SIMPLE
-   tristate Simple tuner support
+   tristate
+   prompt Simple tuner support if MEDIA_TUNER_CUSTOMISE
depends on VIDEO_MEDIA  I2C
select MEDIA_TUNER_TDA9887
default m if MEDIA_TUNER_CUSTOMISE
@@ -55,7 +54,8 @@ config MEDIA_TUNER_SIMPLE
  Say Y here to include support for various simple tuners.
 
 config MEDIA_TUNER_TDA8290
-   tristate TDA 8290/8295 + 8275(a)/18271 tuner combo
+   tristate
+   prompt TDA 8290/8295 + 8275(a)/18271 tuner combo if 
MEDIA_TUNER_CUSTOMISE
depends on VIDEO_MEDIA  I2C
select MEDIA_TUNER_TDA827X
select MEDIA_TUNER_TDA18271
@@ -64,21 +64,24 @@ config MEDIA_TUNER_TDA8290
  Say Y here to include support for Philips TDA8290+8275(a) tuner.
 
 config MEDIA_TUNER_TDA827X
-   tristate Philips TDA827X silicon tuner
+   tristate
+   prompt Philips TDA827X silicon tuner if MEDIA_TUNER_CUSTOMISE
depends on VIDEO_MEDIA  I2C
default m if MEDIA_TUNER_CUSTOMISE
help
  A DVB-T silicon tuner module. Say Y when you want to support this 
tuner.
 
 config MEDIA_TUNER_TDA18271
-   tristate NXP TDA18271 silicon tuner
+   tristate
+   prompt NXP TDA18271 silicon tuner if MEDIA_TUNER_CUSTOMISE
depends on VIDEO_MEDIA  I2C
default m if MEDIA_TUNER_CUSTOMISE
help
  A silicon tuner module. Say Y when you want to support this tuner.
 
 config MEDIA_TUNER_TDA9887
-   tristate TDA 9885/6/7 analog IF demodulator
+   tristate
+   prompt TDA 9885/6/7 analog IF demodulator if MEDIA_TUNER_CUSTOMISE
depends on VIDEO_MEDIA  I2C
default m if MEDIA_TUNER_CUSTOMISE
help
@@ -86,7 +89,8 @@ config MEDIA_TUNER_TDA9887
  analog IF demodulator.
 
 config MEDIA_TUNER_TEA5761
-   tristate TEA 5761 radio tuner (EXPERIMENTAL)
+   tristate
+   prompt TEA 5761 radio tuner (EXPERIMENTAL) if MEDIA_TUNER_CUSTOMISE
depends on VIDEO_MEDIA  I2C
depends on EXPERIMENTAL
default m if MEDIA_TUNER_CUSTOMISE
@@ -94,56 +98,64 @@ config MEDIA_TUNER_TEA5761
  Say Y here to include support for the Philips TEA5761 radio tuner.
 
 config MEDIA_TUNER_TEA5767
-   tristate TEA 5767 radio tuner
+   tristate
+   prompt TEA 5767 radio tuner if MEDIA_TUNER_CUSTOMISE
depends on VIDEO_MEDIA  I2C
default m if MEDIA_TUNER_CUSTOMISE
help
  Say Y here to include support for the Philips TEA5767 radio tuner.
 
 config MEDIA_TUNER_MT20XX
-   tristate Microtune 2032 / 2050 tuners
+   tristate
+   prompt Microtune 2032 / 2050 tuners if MEDIA_TUNER_CUSTOMISE
depends on VIDEO_MEDIA  I2C
default m if MEDIA_TUNER_CUSTOMISE
help
  Say Y here to include support for the MT2032 / MT2050 tuner.
 
 config MEDIA_TUNER_MT2060
-   tristate Microtune MT2060 silicon IF tuner
+   tristate
+   prompt Microtune MT2060 silicon IF tuner if MEDIA_TUNER_CUSTOMISE
depends on VIDEO_MEDIA  I2C
default m if MEDIA_TUNER_CUSTOMISE
help
  A driver for the silicon IF tuner MT2060 from Microtune.
 
 config MEDIA_TUNER_MT2266
-   tristate Microtune MT2266 silicon tuner
+   tristate
+   prompt Microtune MT2266 silicon tuner if MEDIA_TUNER_CUSTOMISE
depends on VIDEO_MEDIA  I2C
default m

[PATCH] vivi: Don't depend on FONTS

2010-10-03 Thread Ben Hutchings
CONFIG_FONTS has nothing to do with whether find_font() is defined.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index f6e4d04..7528d50 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -539,7 +539,7 @@ config VIDEO_VIU
 config VIDEO_VIVI
tristate Virtual Video Driver
depends on VIDEO_DEV  VIDEO_V4L2  !SPARC32  !SPARC64
-   depends on (FRAMEBUFFER_CONSOLE || STI_CONSOLE)  FONTS
+   depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
select FONT_8x16
select VIDEOBUF_VMALLOC
default n
-- 
1.7.1


--
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] V4L/DVB: mantis: Rename gpio_set_bits to mantis_gpio_set_bits

2010-07-02 Thread Ben Hutchings
This function is declared extern and exported, and should not be given
a generic name which may conflict with gpiolib in future.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/mantis/hopper_vp3028.c |4 ++--
 drivers/media/dvb/mantis/mantis_core.c   |2 +-
 drivers/media/dvb/mantis/mantis_dvb.c|   14 +++---
 drivers/media/dvb/mantis/mantis_ioc.c|4 ++--
 drivers/media/dvb/mantis/mantis_ioc.h|2 +-
 drivers/media/dvb/mantis/mantis_vp1034.c |8 
 drivers/media/dvb/mantis/mantis_vp3030.c |4 ++--
 7 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/media/dvb/mantis/hopper_vp3028.c 
b/drivers/media/dvb/mantis/hopper_vp3028.c
index 96674c7..d958449 100644
--- a/drivers/media/dvb/mantis/hopper_vp3028.c
+++ b/drivers/media/dvb/mantis/hopper_vp3028.c
@@ -47,11 +47,11 @@ static int vp3028_frontend_init(struct mantis_pci *mantis, 
struct dvb_frontend *
struct mantis_hwconfig *config  = mantis-hwconfig;
int err = 0;
 
-   gpio_set_bits(mantis, config-reset, 0);
+   mantis_gpio_set_bits(mantis, config-reset, 0);
msleep(100);
err = mantis_frontend_power(mantis, POWER_ON);
msleep(100);
-   gpio_set_bits(mantis, config-reset, 1);
+   mantis_gpio_set_bits(mantis, config-reset, 1);
 
err = mantis_frontend_power(mantis, POWER_ON);
if (err == 0) {
diff --git a/drivers/media/dvb/mantis/mantis_core.c 
b/drivers/media/dvb/mantis/mantis_core.c
index 8113b23..1ac4d12 100644
--- a/drivers/media/dvb/mantis/mantis_core.c
+++ b/drivers/media/dvb/mantis/mantis_core.c
@@ -201,7 +201,7 @@ int mantis_core_exit(struct mantis_pci *mantis)
 }
 
 /* Turn the given bit on or off. */
-void gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value)
+void mantis_gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value)
 {
u32 cur;
 
diff --git a/drivers/media/dvb/mantis/mantis_dvb.c 
b/drivers/media/dvb/mantis/mantis_dvb.c
index 99d82ee..a8e5719 100644
--- a/drivers/media/dvb/mantis/mantis_dvb.c
+++ b/drivers/media/dvb/mantis/mantis_dvb.c
@@ -47,15 +47,15 @@ int mantis_frontend_power(struct mantis_pci *mantis, enum 
mantis_power power)
switch (power) {
case POWER_ON:
dprintk(MANTIS_DEBUG, 1, Power ON);
-   gpio_set_bits(mantis, config-power, POWER_ON);
+   mantis_gpio_set_bits(mantis, config-power, POWER_ON);
msleep(100);
-   gpio_set_bits(mantis, config-power, POWER_ON);
+   mantis_gpio_set_bits(mantis, config-power, POWER_ON);
msleep(100);
break;
 
case POWER_OFF:
dprintk(MANTIS_DEBUG, 1, Power OFF);
-   gpio_set_bits(mantis, config-power, POWER_OFF);
+   mantis_gpio_set_bits(mantis, config-power, POWER_OFF);
msleep(100);
break;
 
@@ -73,13 +73,13 @@ void mantis_frontend_soft_reset(struct mantis_pci *mantis)
struct mantis_hwconfig *config = mantis-hwconfig;
 
dprintk(MANTIS_DEBUG, 1, Frontend RESET);
-   gpio_set_bits(mantis, config-reset, 0);
+   mantis_gpio_set_bits(mantis, config-reset, 0);
msleep(100);
-   gpio_set_bits(mantis, config-reset, 0);
+   mantis_gpio_set_bits(mantis, config-reset, 0);
msleep(100);
-   gpio_set_bits(mantis, config-reset, 1);
+   mantis_gpio_set_bits(mantis, config-reset, 1);
msleep(100);
-   gpio_set_bits(mantis, config-reset, 1);
+   mantis_gpio_set_bits(mantis, config-reset, 1);
msleep(100);
 
return;
diff --git a/drivers/media/dvb/mantis/mantis_ioc.c 
b/drivers/media/dvb/mantis/mantis_ioc.c
index de148de..e97cb63 100644
--- a/drivers/media/dvb/mantis/mantis_ioc.c
+++ b/drivers/media/dvb/mantis/mantis_ioc.c
@@ -82,7 +82,7 @@ int mantis_get_mac(struct mantis_pci *mantis)
 EXPORT_SYMBOL_GPL(mantis_get_mac);
 
 /* Turn the given bit on or off. */
-void gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value)
+void mantis_gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value)
 {
u32 cur;
 
@@ -97,7 +97,7 @@ void gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 
value)
mmwrite(mantis-gpio_status, MANTIS_GPIF_ADDR);
mmwrite(0x00, MANTIS_GPIF_DOUT);
 }
-EXPORT_SYMBOL_GPL(gpio_set_bits);
+EXPORT_SYMBOL_GPL(mantis_gpio_set_bits);
 
 int mantis_stream_control(struct mantis_pci *mantis, enum 
mantis_stream_control stream_ctl)
 {
diff --git a/drivers/media/dvb/mantis/mantis_ioc.h 
b/drivers/media/dvb/mantis/mantis_ioc.h
index 188fe5a..d56e002 100644
--- a/drivers/media/dvb/mantis/mantis_ioc.h
+++ b/drivers/media/dvb/mantis/mantis_ioc.h
@@ -44,7 +44,7 @@ enum mantis_stream_control {
 };
 
 extern int mantis_get_mac(struct mantis_pci *mantis);
-extern void gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value);
+extern void mantis_gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 
value

[PATCH] V4L/DVB: mantis: Select correct frontends

2010-06-02 Thread Ben Hutchings
Update the Kconfig selections to match the code.
Add the usual condition of !DVB_FE_CUSTOMISE.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/mantis/Kconfig |   14 ++
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb/mantis/Kconfig b/drivers/media/dvb/mantis/Kconfig
index f7b72a3..decdeda 100644
--- a/drivers/media/dvb/mantis/Kconfig
+++ b/drivers/media/dvb/mantis/Kconfig
@@ -10,9 +10,15 @@ config MANTIS_CORE
 config DVB_MANTIS
tristate MANTIS based cards
depends on MANTIS_CORE  DVB_CORE  PCI  I2C
-   select DVB_MB86A16
-   select DVB_ZL10353
-   select DVB_STV0299
+   select DVB_MB86A16 if !DVB_FE_CUSTOMISE
+   select DVB_ZL10353 if !DVB_FE_CUSTOMISE
+   select DVB_STV0299 if !DVB_FE_CUSTOMISE
+   select DVB_LNBP21 if !DVB_FE_CUSTOMISE
+   select DVB_STB0899 if !DVB_FE_CUSTOMISE
+   select DVB_STB6100 if !DVB_FE_CUSTOMISE
+   select DVB_TDA665x if !DVB_FE_CUSTOMISE
+   select DVB_TDA10021 if !DVB_FE_CUSTOMISE
+   select DVB_TDA10023 if !DVB_FE_CUSTOMISE
select DVB_PLL
help
  Support for PCI cards based on the Mantis PCI bridge.
@@ -23,7 +29,7 @@ config DVB_MANTIS
 config DVB_HOPPER
tristate HOPPER based cards
depends on MANTIS_CORE  DVB_CORE  PCI  I2C
-   select DVB_ZL10353
+   select DVB_ZL10353 if !DVB_FE_CUSTOMISE
select DVB_PLL
help
  Support for PCI cards based on the Hopper  PCI bridge.
-- 
1.7.1


--
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 0/4] V4L/DVB: Select correct frontends and tuners

2010-05-15 Thread Ben Hutchings
I found a few more drivers that don't select the same frontends and
tuners that they reference.

Ben.

Ben Hutchings (4):
  V4L/DVB: dw2102: Select tda10023 frontend, not tda10021
  V4L/DVB: budget: Select correct frontends
  V4L/DVB: dib0700: Select dib0090 frontend
  V4L/DVB: m920x: Select simple tuner

 drivers/media/dvb/dvb-usb/Kconfig |4 +++-
 drivers/media/dvb/ttpci/Kconfig   |5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)



signature.asc
Description: This is a digitally signed message part


[PATCH 1/4] V4L/DVB: dw2102: Select tda10023 frontend, not tda10021

2010-05-15 Thread Ben Hutchings
Update the Kconfig selections to match the code.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/dvb-usb/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/Kconfig 
b/drivers/media/dvb/dvb-usb/Kconfig
index e5f91f1..cfcbf4f 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -264,7 +264,7 @@ config DVB_USB_DW2102
select DVB_STB6000 if !DVB_FE_CUSTOMISE
select DVB_CX24116 if !DVB_FE_CUSTOMISE
select DVB_SI21XX if !DVB_FE_CUSTOMISE
-   select DVB_TDA10021 if !DVB_FE_CUSTOMISE
+   select DVB_TDA10023 if !DVB_FE_CUSTOMISE
select DVB_MT312 if !DVB_FE_CUSTOMISE
select DVB_ZL10039 if !DVB_FE_CUSTOMISE
select DVB_DS3000 if !DVB_FE_CUSTOMISE
-- 
1.7.1



--
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 2/4] V4L/DVB: budget: Select correct frontends

2010-05-15 Thread Ben Hutchings
Update the Kconfig selections to match the code.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/ttpci/Kconfig |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig
index d8d4214..32a7ec6 100644
--- a/drivers/media/dvb/ttpci/Kconfig
+++ b/drivers/media/dvb/ttpci/Kconfig
@@ -68,13 +68,14 @@ config DVB_BUDGET
select DVB_VES1820 if !DVB_FE_CUSTOMISE
select DVB_L64781 if !DVB_FE_CUSTOMISE
select DVB_TDA8083 if !DVB_FE_CUSTOMISE
-   select DVB_TDA10021 if !DVB_FE_CUSTOMISE
-   select DVB_TDA10023 if !DVB_FE_CUSTOMISE
select DVB_S5H1420 if !DVB_FE_CUSTOMISE
select DVB_TDA10086 if !DVB_FE_CUSTOMISE
select DVB_TDA826X if !DVB_FE_CUSTOMISE
select DVB_LNBP21 if !DVB_FE_CUSTOMISE
select DVB_TDA1004X if !DVB_FE_CUSTOMISE
+   select DVB_ISL6423 if !DVB_FE_CUSTOMISE
+   select DVB_STV090x if !DVB_FE_CUSTOMISE
+   select DVB_STV6110x if !DVB_FE_CUSTOMISE
help
  Support for simple SAA7146 based DVB cards (so called Budget-
  or Nova-PCI cards) without onboard MPEG2 decoder, and without
-- 
1.7.1



--
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 3/4] V4L/DVB: dib0700: Select dib0090 frontend

2010-05-15 Thread Ben Hutchings
Update the Kconfig selections to match the code.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/dvb-usb/Kconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/Kconfig 
b/drivers/media/dvb/dvb-usb/Kconfig
index cfcbf4f..73a6e9d 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -76,6 +76,7 @@ config DVB_USB_DIB0700
select DVB_S5H1411 if !DVB_FE_CUSTOMISE
select DVB_LGDT3305 if !DVB_FE_CUSTOMISE
select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE
+   select DVB_TUNER_DIB0090 if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMISE
select MEDIA_TUNER_MT2266 if !MEDIA_TUNER_CUSTOMISE
select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE
-- 
1.7.1



--
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 4/4] V4L/DVB: m920x: Select simple tuner

2010-05-15 Thread Ben Hutchings
Update the Kconfig selections to match the code.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/dvb-usb/Kconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/Kconfig 
b/drivers/media/dvb/dvb-usb/Kconfig
index 73a6e9d..553b48a 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -135,6 +135,7 @@ config DVB_USB_M920X
select DVB_TDA1004X if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMISE
select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMISE
+   select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMISE
help
  Say Y here to support the MSI Mega Sky 580 USB2.0 DVB-T receiver.
  Currently, only devices with a product id of
-- 
1.7.1


--
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 firmware 6/6] Add firmware for lgs8g75

2010-02-27 Thread Ben Hutchings
This is taken from the lgs8gxx driver as of 2.6.32-rc5.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
The binary changes are omitted from this message as they are impossible
to review.

Ben.

 WHENCE |9 +
 lgs8g75.fw |  Bin 0 - 262 bytes
 2 files changed, 9 insertions(+), 0 deletions(-)
 create mode 100644 lgs8g75.fw

diff --git a/WHENCE b/WHENCE
index d62468e..659e255 100644
--- a/WHENCE
+++ b/WHENCE
@@ -1184,3 +1184,12 @@ Found in hex form in kernel source.
 
 --
 
+Driver: lgs8gxx - Legend Silicon GB20600 demodulator driver
+
+File: lgs8g75.fw
+
+Licence: Unknown
+
+Found in hex form in kernel source.
+
+--

--
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] V4L/DVB: lgs8gxx: remove firmware for lgs8g75

2010-02-17 Thread Ben Hutchings
On Tue, 2010-02-02 at 13:40 -0200, Mauro Carvalho Chehab wrote:
 Mauro Carvalho Chehab wrote:
  Ben Hutchings wrote:
  The recently added support for lgs8g75 included some 8051 machine code
  without accompanying source code.  Replace this with use of the
  firmware loader.
 
  Compile-tested only.
 
  Signed-off-by: Ben Hutchings b...@decadent.org.uk
  ---
  This firmware can be added to linux-firmware.git instead, and I will be
  requesting that very shortly.
  
  Had you submitted a patch for it already? Could you please test the patch 
  before we commit it at the tree?
 
 Ping.

I'm still trying to get some response from David Woodhouse to my
previous pull request.

Ben.

-- 
Ben Hutchings
Make three consecutive correct guesses and you will be considered an expert.


signature.asc
Description: This is a digitally signed message part


[PATCH] cxusb: Select all required frontend and tuner modules

2010-02-10 Thread Ben Hutchings
cxusb uses the atbm8830 and lgs8gxx (not lgs8gl5) frontends and the
max2165 tuner, so it needs to select them.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
Cc: sta...@kernel.org
---
 drivers/media/dvb/dvb-usb/Kconfig |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/Kconfig 
b/drivers/media/dvb/dvb-usb/Kconfig
index 1b24989..465295b 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -112,11 +112,13 @@ config DVB_USB_CXUSB
select DVB_MT352 if !DVB_FE_CUSTOMISE
select DVB_ZL10353 if !DVB_FE_CUSTOMISE
select DVB_DIB7000P if !DVB_FE_CUSTOMISE
-   select DVB_LGS8GL5 if !DVB_FE_CUSTOMISE
select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE
+   select DVB_ATBM8830 if !DVB_FE_CUSTOMISE
+   select DVB_LGS8GXX if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMISE
select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE
select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMISE
+   select MEDIA_TUNER_MAX2165 if !MEDIA_TUNER_CUSTOMISE
help
  Say Y here to support the Conexant USB2.0 hybrid reference design.
  Currently, only DVB and ATSC modes are supported, analog mode
-- 
1.6.6


--
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/11] dabusb: declare MODULE_FIRMWARE

2010-01-13 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
Mauro,

You nacked my previous patches for media because they would result in
many false dependencies.  However, I think this driver at least will
always depend on the same files.

Ben.

 drivers/media/video/dabusb.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c
index ee43876..9b413a3 100644
--- a/drivers/media/video/dabusb.c
+++ b/drivers/media/video/dabusb.c
@@ -913,6 +913,8 @@ static void __exit dabusb_cleanup (void)
 MODULE_AUTHOR( DRIVER_AUTHOR );
 MODULE_DESCRIPTION( DRIVER_DESC );
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dabusb/firmware.fw);
+MODULE_FIRMWARE(dabusb/bitstream.bin);
 
 module_param(buffers, int, 0);
 MODULE_PARM_DESC (buffers, Number of buffers (default=256));
-- 
1.6.5.7


--
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/75] V4L/DVB: declare MODULE_FIRMWARE for modules using XC2028 and XC3028L tuners

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
I'm not really sure whether it's better to do this in the drivers which
specify which firmware file to use, or just once in the xc2028 tuner
driver.  Your call.

Ben.

 drivers/media/dvb/dvb-usb/cxusb.c   |1 +
 drivers/media/dvb/dvb-usb/dib0700_devices.c |1 +
 drivers/media/video/cx18/cx18-driver.c  |1 +
 drivers/media/video/cx23885/cx23885-dvb.c   |3 +++
 drivers/media/video/cx88/cx88-cards.c   |2 ++
 drivers/media/video/em28xx/em28xx-cards.c   |3 +++
 drivers/media/video/ivtv/ivtv-driver.c  |1 +
 drivers/media/video/saa7134/saa7134-cards.c |2 ++
 8 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/cxusb.c 
b/drivers/media/dvb/dvb-usb/cxusb.c
index f65591f..bc44d30 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -1863,3 +1863,4 @@ MODULE_AUTHOR(Chris Pascoe c.pas...@itee.uq.edu.au);
 MODULE_DESCRIPTION(Driver for Conexant USB2.0 hybrid reference design);
 MODULE_VERSION(1.0-alpha);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c 
b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index 684146f..d003ff0 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -408,6 +408,7 @@ static struct xc2028_ctrl stk7700ph_xc3028_ctrl = {
.max_len = 64,
.demod = XC3028_FE_DIBCOM52,
 };
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
 
 static struct xc2028_config stk7700ph_xc3028_config = {
.i2c_addr = 0x61,
diff --git a/drivers/media/video/cx18/cx18-driver.c 
b/drivers/media/video/cx18/cx18-driver.c
index e12082b..6fdd57e 100644
--- a/drivers/media/video/cx18/cx18-driver.c
+++ b/drivers/media/video/cx18/cx18-driver.c
@@ -237,6 +237,7 @@ MODULE_AUTHOR(Hans Verkuil);
 MODULE_DESCRIPTION(CX23418 driver);
 MODULE_SUPPORTED_DEVICE(CX23418 MPEG2 encoder);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
 
 MODULE_VERSION(CX18_VERSION);
 
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c 
b/drivers/media/video/cx23885/cx23885-dvb.c
index f4f046c..fe8331a 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -956,6 +956,9 @@ static int dvb_register(struct cx23885_tsport *port)
return ret;
 }
 
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
+MODULE_FIRMWARE(XC3028L_DEFAULT_FIRMWARE);
+
 int cx23885_dvb_register(struct cx23885_tsport *port)
 {
 
diff --git a/drivers/media/video/cx88/cx88-cards.c 
b/drivers/media/video/cx88/cx88-cards.c
index 7330a2d..4a91dd9 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -3080,6 +3080,8 @@ void cx88_setup_xc3028(struct cx88_core *core, struct 
xc2028_ctrl *ctl)
 }
 EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
 
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
+
 static void cx88_card_setup(struct cx88_core *core)
 {
static u8 eeprom[256];
diff --git a/drivers/media/video/em28xx/em28xx-cards.c 
b/drivers/media/video/em28xx/em28xx-cards.c
index 4fd91f5..8c2048b 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -2090,6 +2090,9 @@ static void em28xx_setup_xc3028(struct em28xx *dev, 
struct xc2028_ctrl *ctl)
}
 }
 
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
+MODULE_FIRMWARE(XC3028L_DEFAULT_FIRMWARE);
+
 static void em28xx_tuner_setup(struct em28xx *dev)
 {
struct tuner_setup   tun_setup;
diff --git a/drivers/media/video/ivtv/ivtv-driver.c 
b/drivers/media/video/ivtv/ivtv-driver.c
index 7cdbc1a..4c74142 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -254,6 +254,7 @@ MODULE_SUPPORTED_DEVICE
 (CX23415/CX23416 MPEG2 encoder (WinTV PVR-150/250/350/500,\n
\t\t\tYuan MPG series and similar));
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
 
 MODULE_VERSION(IVTV_VERSION);
 
diff --git a/drivers/media/video/saa7134/saa7134-cards.c 
b/drivers/media/video/saa7134/saa7134-cards.c
index 7e40d6d..e137203 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -7029,6 +7029,8 @@ static void saa7134_tuner_setup(struct saa7134_dev *dev)
}
 }
 
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
+
 /* stuff which needs working i2c */
 int saa7134_board_init2(struct saa7134_dev *dev)
 {
-- 
1.6.5.2



--
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/75] xc5000: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/common/tuners/xc5000.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/common/tuners/xc5000.c 
b/drivers/media/common/tuners/xc5000.c
index 432003d..e13165a 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -1130,3 +1130,4 @@ EXPORT_SYMBOL(xc5000_attach);
 MODULE_AUTHOR(Steven Toth);
 MODULE_DESCRIPTION(Xceive xc5000 silicon tuner driver);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-fe-xc5000-1.6.114.fw);
-- 
1.6.5.2



--
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/75] dvb-usb: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/dvb-usb/a800.c|1 +
 drivers/media/dvb/dvb-usb/af9005.c  |1 +
 drivers/media/dvb/dvb-usb/af9015.c  |1 +
 drivers/media/dvb/dvb-usb/cxusb.c   |2 ++
 drivers/media/dvb/dvb-usb/dib0700_devices.c |1 +
 drivers/media/dvb/dvb-usb/dibusb-mb.c   |4 
 drivers/media/dvb/dvb-usb/digitv.c  |1 +
 drivers/media/dvb/dvb-usb/dtt200u.c |5 +
 drivers/media/dvb/dvb-usb/dw2102.c  |4 
 drivers/media/dvb/dvb-usb/gp8psk.c  |1 +
 drivers/media/dvb/dvb-usb/m920x.c   |4 
 drivers/media/dvb/dvb-usb/nova-t-usb2.c |1 +
 drivers/media/dvb/dvb-usb/opera1.c  |1 +
 drivers/media/dvb/dvb-usb/ttusb2.c  |2 ++
 drivers/media/dvb/dvb-usb/umt-010.c |1 +
 drivers/media/dvb/dvb-usb/vp702x.c  |1 +
 drivers/media/dvb/dvb-usb/vp7045.c  |1 +
 17 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c
index 6247239..ae74174 100644
--- a/drivers/media/dvb/dvb-usb/a800.c
+++ b/drivers/media/dvb/dvb-usb/a800.c
@@ -195,3 +195,4 @@ MODULE_AUTHOR(Patrick Boettcher 
patrick.boettc...@desy.de);
 MODULE_DESCRIPTION(AVerMedia AverTV DVB-T USB 2.0 (A800));
 MODULE_VERSION(1.0);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-usb-avertv-a800-02.fw);
diff --git a/drivers/media/dvb/dvb-usb/af9005.c 
b/drivers/media/dvb/dvb-usb/af9005.c
index ca5a0a4..d26c70b 100644
--- a/drivers/media/dvb/dvb-usb/af9005.c
+++ b/drivers/media/dvb/dvb-usb/af9005.c
@@ -1142,3 +1142,4 @@ MODULE_AUTHOR(Luca Olivetti l...@ventoso.org);
 MODULE_DESCRIPTION(Driver for Afatech 9005 DVB-T USB1.1 stick);
 MODULE_VERSION(1.0);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(af9005.fw);
diff --git a/drivers/media/dvb/dvb-usb/af9015.c 
b/drivers/media/dvb/dvb-usb/af9015.c
index bad3e10..8463faf 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -1687,3 +1687,4 @@ module_exit(af9015_usb_module_exit);
 MODULE_AUTHOR(Antti Palosaari cr...@iki.fi);
 MODULE_DESCRIPTION(Driver for Afatech AF9015 DVB-T);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-usb-af9015.fw);
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c 
b/drivers/media/dvb/dvb-usb/cxusb.c
index bc44d30..556f643 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -1864,3 +1864,5 @@ MODULE_DESCRIPTION(Driver for Conexant USB2.0 hybrid 
reference design);
 MODULE_VERSION(1.0-alpha);
 MODULE_LICENSE(GPL);
 MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
+MODULE_FIRMWARE(dvb-usb-bluebird-01.fw);
+MODULE_FIRMWARE(dvb-usb-bluebird-02.fw);
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c 
b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index d003ff0..ee6a60b 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -1951,6 +1951,7 @@ MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table);
.size_of_priv  = sizeof(struct dib0700_state), \
.i2c_algo  = dib0700_i2c_algo, \
.identify_state= dib0700_identify_state
+MODULE_FIRMWARE(dvb-usb-dib0700-1.20.fw);
 
 #define DIB0700_DEFAULT_STREAMING_CONFIG(ep) \
.streaming_ctrl   = dib0700_streaming_ctrl, \
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c 
b/drivers/media/dvb/dvb-usb/dibusb-mb.c
index eeef50b..87f1775 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -467,3 +467,7 @@ MODULE_AUTHOR(Patrick Boettcher 
patrick.boettc...@desy.de);
 MODULE_DESCRIPTION(Driver for DiBcom USB DVB-T devices (DiB3000M-B based));
 MODULE_VERSION(1.0);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-usb-dibusb-5.0.0.11.fw);
+MODULE_FIRMWARE(dvb-usb-dibusb-an2235-01.fw);
+MODULE_FIRMWARE(dvb-usb-adstech-usb2-02.fw);
+MODULE_FIRMWARE(dvb-usb-dibusb-6.0.0.8.fw);
diff --git a/drivers/media/dvb/dvb-usb/digitv.c 
b/drivers/media/dvb/dvb-usb/digitv.c
index 955147d..09e2d44 100644
--- a/drivers/media/dvb/dvb-usb/digitv.c
+++ b/drivers/media/dvb/dvb-usb/digitv.c
@@ -361,3 +361,4 @@ MODULE_AUTHOR(Patrick Boettcher 
patrick.boettc...@desy.de);
 MODULE_DESCRIPTION(Driver for Nebula Electronics uDigiTV DVB-T USB2.0);
 MODULE_VERSION(1.0-alpha);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-usb-digitv-02.fw);
diff --git a/drivers/media/dvb/dvb-usb/dtt200u.c 
b/drivers/media/dvb/dvb-usb/dtt200u.c
index a1b12b0..38ecca0 100644
--- a/drivers/media/dvb/dvb-usb/dtt200u.c
+++ b/drivers/media/dvb/dvb-usb/dtt200u.c
@@ -365,3 +365,8 @@ MODULE_AUTHOR(Patrick Boettcher 
patrick.boettc...@desy.de);
 MODULE_DESCRIPTION(Driver for the WideView/Yakumo/Hama/Typhoon/Club3D/Miglia 
DVB-T USB2.0 devices);
 MODULE_VERSION(1.0);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-usb-dtt200u-01.fw);
+MODULE_FIRMWARE(dvb-usb-wt220u-02.fw);
+MODULE_FIRMWARE(dvb-usb-wt220u-fc03.fw);
+MODULE_FIRMWARE(dvb-usb-wt220u-zl0353-01.fw

[PATCH 13/75] af90013: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/af9013.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/af9013.c 
b/drivers/media/dvb/frontends/af9013.c
index 12e018b..fc1c8c8 100644
--- a/drivers/media/dvb/frontends/af9013.c
+++ b/drivers/media/dvb/frontends/af9013.c
@@ -1694,3 +1694,4 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 MODULE_AUTHOR(Antti Palosaari cr...@iki.fi);
 MODULE_DESCRIPTION(Afatech AF9013 DVB-T demodulator driver);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(AF9013_DEFAULT_FIRMWARE);
-- 
1.6.5.2



--
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/75] bcm3510: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/bcm3510.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/bcm3510.c 
b/drivers/media/dvb/frontends/bcm3510.c
index cf5e576..a08bd1f 100644
--- a/drivers/media/dvb/frontends/bcm3510.c
+++ b/drivers/media/dvb/frontends/bcm3510.c
@@ -852,3 +852,4 @@ static struct dvb_frontend_ops bcm3510_ops = {
 MODULE_DESCRIPTION(Broadcom BCM3510 ATSC (8VSB/16VSB  ITU J83 AnnexB FEC 
QAM64/256) demodulator driver);
 MODULE_AUTHOR(Patrick Boettcher patrick.boettc...@desy.de);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(BCM3510_DEFAULT_FIRMWARE);
-- 
1.6.5.2



--
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/75] cx24416: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/cx24116.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/frontends/cx24116.c 
b/drivers/media/dvb/frontends/cx24116.c
index 2410d8b..f3eef67 100644
--- a/drivers/media/dvb/frontends/cx24116.c
+++ b/drivers/media/dvb/frontends/cx24116.c
@@ -1506,4 +1506,4 @@ static struct dvb_frontend_ops cx24116_ops = {
 MODULE_DESCRIPTION(DVB Frontend module for Conexant cx24116/cx24118 
hardware);
 MODULE_AUTHOR(Steven Toth);
 MODULE_LICENSE(GPL);
-
+MODULE_FIRMWARE(CX24116_DEFAULT_FIRMWARE);
-- 
1.6.5.2



--
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/75] drx397xD: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Move punctuation into definition of _FW_ENTRY so we can use either a
comma or semicolon.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/drx397xD.c|7 ---
 drivers/media/dvb/frontends/drx397xD_fw.h |4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/media/dvb/frontends/drx397xD.c 
b/drivers/media/dvb/frontends/drx397xD.c
index 868b78b..4f4c403 100644
--- a/drivers/media/dvb/frontends/drx397xD.c
+++ b/drivers/media/dvb/frontends/drx397xD.c
@@ -39,7 +39,7 @@ static const char mod_name[] = drx397xD;
 #define F_SET_0D4h 2
 
 enum fw_ix {
-#define _FW_ENTRY(a, b, c) b
+#define _FW_ENTRY(a, b, c) b,
 #include drx397xD_fw.h
 };
 
@@ -77,7 +77,7 @@ static struct {
.file   = NULL, \
.lock   = __RW_LOCK_UNLOCKED(fw[c].lock),   \
.refcnt = 0,\
-   .data   = { }   }
+   .data   = { }   },
 #include drx397xD_fw.h
 };
 
@@ -1507,4 +1507,5 @@ EXPORT_SYMBOL(drx397xD_attach);
 MODULE_DESCRIPTION(Micronas DRX397xD DVB-T Frontend);
 MODULE_AUTHOR(Henk Vergonet);
 MODULE_LICENSE(GPL);
-
+#define _FW_ENTRY(a, b, c) MODULE_FIRMWARE(a);
+#include drx397xD_fw.h
diff --git a/drivers/media/dvb/frontends/drx397xD_fw.h 
b/drivers/media/dvb/frontends/drx397xD_fw.h
index c8b44c1..f0260ad 100644
--- a/drivers/media/dvb/frontends/drx397xD_fw.h
+++ b/drivers/media/dvb/frontends/drx397xD_fw.h
@@ -18,8 +18,8 @@
  */
 
 #ifdef _FW_ENTRY
-   _FW_ENTRY(drx397xD.A2.fw, DRXD_FW_A2 = 0, DRXD_FW_A2  ),
-   _FW_ENTRY(drx397xD.B1.fw, DRXD_FW_B1, DRXD_FW_B1  ),
+   _FW_ENTRY(drx397xD.A2.fw, DRXD_FW_A2 = 0, DRXD_FW_A2  )
+   _FW_ENTRY(drx397xD.B1.fw, DRXD_FW_B1, DRXD_FW_B1  )
 #undef _FW_ENTRY
 #endif /* _FW_ENTRY */
 
-- 
1.6.5.2



--
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/75] nxt200x: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/nxt200x.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/nxt200x.c 
b/drivers/media/dvb/frontends/nxt200x.c
index eac2065..9c6f530 100644
--- a/drivers/media/dvb/frontends/nxt200x.c
+++ b/drivers/media/dvb/frontends/nxt200x.c
@@ -1236,6 +1236,8 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 MODULE_DESCRIPTION(NXT200X (ATSC 8VSB  ITU-T J.83 AnnexB 64/256 QAM) 
Demodulator Driver);
 MODULE_AUTHOR(Kirk Lapray, Michael Krufky, Jean-Francois Thibert, and Taylor 
Jacob);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(NXT2002_DEFAULT_FIRMWARE);
+MODULE_FIRMWARE(NXT2004_DEFAULT_FIRMWARE);
 
 EXPORT_SYMBOL(nxt200x_attach);
 
-- 
1.6.5.2



--
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 18/75] or51132: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/or51132.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/or51132.c 
b/drivers/media/dvb/frontends/or51132.c
index 38e67ac..1b6529d 100644
--- a/drivers/media/dvb/frontends/or51132.c
+++ b/drivers/media/dvb/frontends/or51132.c
@@ -615,6 +615,8 @@ MODULE_DESCRIPTION(OR51132 ATSC [pcHDTV HD-3000] (8VSB  
ITU J83 AnnexB FEC QAM
 MODULE_AUTHOR(Kirk Lapray);
 MODULE_AUTHOR(Trent Piepho);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(OR51132_VSB_FIRMWARE);
+MODULE_FIRMWARE(OR51132_QAM_FIRMWARE);
 
 EXPORT_SYMBOL(or51132_attach);
 
-- 
1.6.5.2



--
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/75] or51211: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/or51211.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/or51211.c 
b/drivers/media/dvb/frontends/or51211.c
index c709ce6..5102038 100644
--- a/drivers/media/dvb/frontends/or51211.c
+++ b/drivers/media/dvb/frontends/or51211.c
@@ -577,6 +577,7 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 MODULE_DESCRIPTION(Oren OR51211 VSB [pcHDTV HD-2000] Demodulator Driver);
 MODULE_AUTHOR(Kirk Lapray);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(OR51211_DEFAULT_FIRMWARE);
 
 EXPORT_SYMBOL(or51211_attach);
 
-- 
1.6.5.2



--
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/75] sp8870: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/sp8870.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/sp8870.c 
b/drivers/media/dvb/frontends/sp8870.c
index b85eb60..51bee98 100644
--- a/drivers/media/dvb/frontends/sp8870.c
+++ b/drivers/media/dvb/frontends/sp8870.c
@@ -615,5 +615,6 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 MODULE_DESCRIPTION(Spase SP8870 DVB-T Demodulator driver);
 MODULE_AUTHOR(Juergen Peitz);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(SP8870_DEFAULT_FIRMWARE);
 
 EXPORT_SYMBOL(sp8870_attach);
-- 
1.6.5.2



--
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/75] sp887x: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/sp887x.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/sp887x.c 
b/drivers/media/dvb/frontends/sp887x.c
index 4a7c3d8..298e2a5 100644
--- a/drivers/media/dvb/frontends/sp887x.c
+++ b/drivers/media/dvb/frontends/sp887x.c
@@ -613,5 +613,6 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 
 MODULE_DESCRIPTION(Spase sp887x DVB-T demodulator driver);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(SP887X_DEFAULT_FIRMWARE);
 
 EXPORT_SYMBOL(sp887x_attach);
-- 
1.6.5.2



--
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 22/75] tda10048: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/tda10048.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/tda10048.c 
b/drivers/media/dvb/frontends/tda10048.c
index 4e2a7c8..175e90e 100644
--- a/drivers/media/dvb/frontends/tda10048.c
+++ b/drivers/media/dvb/frontends/tda10048.c
@@ -1170,3 +1170,4 @@ MODULE_PARM_DESC(debug, Enable verbose debug messages);
 MODULE_DESCRIPTION(NXP TDA10048HN DVB-T Demodulator driver);
 MODULE_AUTHOR(Steven Toth);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(TDA10048_DEFAULT_FIRMWARE);
-- 
1.6.5.2



--
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 23/75] tda1004x: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/tda1004x.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/tda1004x.c 
b/drivers/media/dvb/frontends/tda1004x.c
index f2a8abe..0561aa1 100644
--- a/drivers/media/dvb/frontends/tda1004x.c
+++ b/drivers/media/dvb/frontends/tda1004x.c
@@ -1375,6 +1375,8 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 MODULE_DESCRIPTION(Philips TDA10045H  TDA10046H DVB-T Demodulator);
 MODULE_AUTHOR(Andrew de Quincey  Robert Schlabbach);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(TDA10045_DEFAULT_FIRMWARE);
+MODULE_FIRMWARE(TDA10046_DEFAULT_FIRMWARE);
 
 EXPORT_SYMBOL(tda10045_attach);
 EXPORT_SYMBOL(tda10046_attach);
-- 
1.6.5.2



--
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/75] smsmdtv/smsusb: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/siano/sms-cards.c  |4 
 drivers/media/dvb/siano/smscoreapi.c |7 +++
 drivers/media/dvb/siano/smsusb.c |4 
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/siano/sms-cards.c 
b/drivers/media/dvb/siano/sms-cards.c
index e216389..9c425d7 100644
--- a/drivers/media/dvb/siano/sms-cards.c
+++ b/drivers/media/dvb/siano/sms-cards.c
@@ -96,6 +96,10 @@ static struct sms_board sms_boards[] = {
.type = SMS_VEGA,
},
 };
+MODULE_FIRMWARE(sms1xxx-stellar-dvbt-01.fw);
+MODULE_FIRMWARE(sms1xxx-nova-a-dvbt-01.fw);
+MODULE_FIRMWARE(sms1xxx-nova-b-dvbt-01.fw);
+MODULE_FIRMWARE(sms1xxx-hcw-55xxx-dvbt-02.fw);
 
 struct sms_board *sms_get_board(int id)
 {
diff --git a/drivers/media/dvb/siano/smscoreapi.c 
b/drivers/media/dvb/siano/smscoreapi.c
index ca758bc..c613f0d 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -790,6 +790,13 @@ static char *smscore_fw_lkup[][SMS_NUM_OF_DEVICE_TYPES] = {
/*CMMB*/
{none, none, none, cmmb_vega_12mhz.inp}
 };
+MODULE_FIRMWARE(dvb_nova_12mhz.inp);
+MODULE_FIRMWARE(dvb_nova_12mhz_b0.inp);
+MODULE_FIRMWARE(tdmb_nova_12mhz.inp);
+MODULE_FIRMWARE(tdmb_nova_12mhz_b0.inp);
+MODULE_FIRMWARE(isdbt_nova_12mhz.inp);
+MODULE_FIRMWARE(isdbt_nova_12mhz_b0.inp);
+MODULE_FIRMWARE(cmmb_vega_12mhz.inp);
 
 static inline char *sms_get_fw_name(struct smscore_device_t *coredev,
int mode, enum sms_device_type_st type)
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c
index 8f88a58..a97bf96 100644
--- a/drivers/media/dvb/siano/smsusb.c
+++ b/drivers/media/dvb/siano/smsusb.c
@@ -193,6 +193,10 @@ static char *smsusb1_fw_lkup[] = {
none,
dvbt_bda_stellar_usb.inp,
 };
+MODULE_FIRMWARE(dvbt_stellar_usb.inp);
+MODULE_FIRMWARE(dvbh_stellar_usb.inp);
+MODULE_FIRMWARE(tdmb_stellar_usb.inp);
+MODULE_FIRMWARE(dvbt_bda_stellar_usb.inp);
 
 static inline char *sms_get_fw_name(int mode, int board_id)
 {
-- 
1.6.5.2



--
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/75] dvb-ttpci/av7110: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/ttpci/av7110.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 8d65c65..5ddc9d6 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -2922,3 +2922,4 @@ MODULE_DESCRIPTION(driver for the SAA7146 based AV110 
PCI DVB cards by 
   Siemens, Technotrend, Hauppauge);
 MODULE_AUTHOR(Ralph Metzler, Marcus Metzler, others);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-ttpci-01.fw);
-- 
1.6.5.2



--
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 26/75] ttusb-dec: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/ttusb-dec/ttusb_dec.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c 
b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index d91e063..f835852 100644
--- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -1781,3 +1781,6 @@ MODULE_AUTHOR(Alex Woods linux-...@giblets.org);
 MODULE_DESCRIPTION(DRIVER_NAME);
 MODULE_LICENSE(GPL);
 MODULE_DEVICE_TABLE(usb, ttusb_dec_table);
+MODULE_FIRMWARE(dvb-ttusb-dec-2000t.fw);
+MODULE_FIRMWARE(dvb-ttusb-dec-2540t.fw);
+MODULE_FIRMWARE(dvb-ttusb-dec-3000s.fw);
-- 
1.6.5.2



--
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 27/75] bttv: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/bt8xx/bttv-cards.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/bt8xx/bttv-cards.c 
b/drivers/media/video/bt8xx/bttv-cards.c
index 12279f6..000b970 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -3820,6 +3820,8 @@ static int __devinit pvr_boot(struct bttv *btv)
return rc;
 }
 
+MODULE_FIRMWARE(hcwamc.rbf);
+
 /* --- */
 /* some osprey specific stuff  */
 
-- 
1.6.5.2



--
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/75] cpia2: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/cpia2/cpia2_core.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cpia2/cpia2_core.c 
b/drivers/media/video/cpia2/cpia2_core.c
index 1cc0df8..8897032 100644
--- a/drivers/media/video/cpia2/cpia2_core.c
+++ b/drivers/media/video/cpia2/cpia2_core.c
@@ -943,6 +943,8 @@ static int apply_vp_patch(struct camera_data *cam)
return 0;
 }
 
+MODULE_FIRMWARE(cpia2/stv0672_vp4.bin);
+
 /**
  *
  *  set_default_user_mode
-- 
1.6.5.2



--
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/75] cx23885: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/cx23885/cx23885-417.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx23885/cx23885-417.c 
b/drivers/media/video/cx23885/cx23885-417.c
index 0eed852..ff36155 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -41,6 +41,7 @@
 
 #define CX23885_FIRM_IMAGE_SIZE 376836
 #define CX23885_FIRM_IMAGE_NAME v4l-cx23885-enc.fw
+MODULE_FIRMWARE(CX23885_FIRM_IMAGE_NAME);
 
 static unsigned int mpegbufs = 32;
 module_param(mpegbufs, int, 0644);
-- 
1.6.5.2



--
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 31/75] cx25840: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/cx25840/cx25840-firmware.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx25840/cx25840-firmware.c 
b/drivers/media/video/cx25840/cx25840-firmware.c
index 8150200..6dd9253 100644
--- a/drivers/media/video/cx25840/cx25840-firmware.c
+++ b/drivers/media/video/cx25840/cx25840-firmware.c
@@ -73,6 +73,9 @@ static const char *get_fw_name(struct i2c_client *client)
return v4l-cx231xx-avcore-01.fw;
return v4l-cx25840.fw;
 }
+MODULE_FIRMWARE(v4l-cx23885-avcore-01.fw);
+MODULE_FIRMWARE(v4l-cx231xx-avcore-01.fw);
+MODULE_FIRMWARE(v4l-cx25840.fw);
 
 static int check_fw_load(struct i2c_client *client, int size)
 {
-- 
1.6.5.2



--
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 32/75] cx88-blackbird: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/cx88/cx88-blackbird.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx88/cx88-blackbird.c 
b/drivers/media/video/cx88/cx88-blackbird.c
index fbdc1cd..da62b37 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -42,6 +42,7 @@
 MODULE_DESCRIPTION(driver for cx2388x/cx23416 based mpeg encoder cards);
 MODULE_AUTHOR(Jelle Foks je...@foks.us, Gerd Knorr kra...@bytesex.org 
[SuSE Labs]);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(CX2341X_FIRM_ENC_FILENAME);
 
 static unsigned int mpegbufs = 32;
 module_param(mpegbufs,int,0644);
-- 
1.6.5.2



--
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


  1   2   >