diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-05 16:08:38 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-05 16:08:38 -0200 |
commit | 0cb9746f402b6eb2d3220ae59b522cddf4db9bcd (patch) | |
tree | ad18dad0157ba363ccf18dc49c55a566f2dd917a /linux/drivers/media/dvb/dvb-usb | |
parent | 3158ca28c70ee3bd15dfc924f0352bfb8e633062 (diff) | |
parent | 3abc5a28999dce72afa17a7a057122a088affef7 (diff) | |
download | mediapointer-dvb-s2-0cb9746f402b6eb2d3220ae59b522cddf4db9bcd.tar.gz mediapointer-dvb-s2-0cb9746f402b6eb2d3220ae59b522cddf4db9bcd.tar.bz2 |
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/anysee.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c | 6 |
2 files changed, 4 insertions, 6 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. diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c index 5cef12a07..6fe71c674 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c @@ -13,14 +13,14 @@ int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf, { int actlen,ret = -ENOMEM; + if (!d || wbuf == NULL || wlen == 0) + return -EINVAL; + if (d->props.generic_bulk_ctrl_endpoint == 0) { err("endpoint for generic control not specified."); return -EINVAL; } - if (wbuf == NULL || wlen == 0) - return -EINVAL; - if ((ret = mutex_lock_interruptible(&d->usb_mutex))) return ret; |