diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-30 00:16:04 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-30 00:16:04 +0000 |
commit | 103cb4e1e8762fb39d1121e269f758db45071e13 (patch) | |
tree | 6b32763654bcc2ba22da6d1f6206e4240f1abfb0 | |
parent | 4c189b0ddd2ccef261a6aa36ca3fa62cf349a252 (diff) | |
download | mediapointer-dvb-s2-103cb4e1e8762fb39d1121e269f758db45071e13.tar.gz mediapointer-dvb-s2-103cb4e1e8762fb39d1121e269f758db45071e13.tar.bz2 |
anysee: initialize anysee_usb_mutex statically
From: Akinobu Mita <akinobu.mita@gmail.com>
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 <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/anysee.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/anysee.c b/linux/drivers/media/dvb/dvb-usb/anysee.c index c786359fb..cd2edbcaa 100644 --- a/linux/drivers/media/dvb/dvb-usb/anysee.c +++ b/linux/drivers/media/dvb/dvb-usb/anysee.c @@ -46,7 +46,7 @@ module_param_named(delsys, dvb_usb_anysee_delsys, int, 0644); 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_interface *intf, 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. |