The patch number 9494 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Akinobu Mita  <[EMAIL PROTECTED]>
anysee: initialize anysee_usb_mutex statically


anysee_usb_mutex is initialized at every time the anysee device is probed.
 If the second anysee device is probed while anysee_usb_mutex is locked by
the first anysee device, the mutex is broken.

This patch fixes by initialize anysee_usb_mutex statically rather
than initialize at probe time.

Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>


---

 linux/drivers/media/dvb/dvb-usb/anysee.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff -r 00f7f44ce20f -r 6820242fc76c linux/drivers/media/dvb/dvb-usb/anysee.c
--- a/linux/drivers/media/dvb/dvb-usb/anysee.c  Wed Oct 29 17:37:49 2008 +0000
+++ b/linux/drivers/media/dvb/dvb-usb/anysee.c  Thu Oct 30 00:16:04 2008 +0000
@@ -46,7 +46,7 @@ MODULE_PARM_DESC(delsys, "select deliver
 MODULE_PARM_DESC(delsys, "select delivery mode (0=DVB-C, 1=DVB-T)");
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
-static struct mutex anysee_usb_mutex;
+static DEFINE_MUTEX(anysee_usb_mutex);
 
 static int anysee_ctrl_msg(struct dvb_usb_device *d, u8 *sbuf, u8 slen,
        u8 *rbuf, u8 rlen)
@@ -456,8 +456,6 @@ static int anysee_probe(struct usb_inter
        struct usb_host_interface *alt;
        int ret;
 
-       mutex_init(&anysee_usb_mutex);
-
        /* There is one interface with two alternate settings.
           Alternate setting 0 is for bulk transfer.
           Alternate setting 1 is for isochronous transfer.


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/6820242fc76cff02f3ae24b8e767723aac7bf0c4

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to