diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-12-13 07:46:46 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-12-13 07:46:46 -0200 |
commit | 5a13cb21630597799e7a398da33878568905020c (patch) | |
tree | 896854cf6024097f9023013adb7d94d7f6141192 | |
parent | f91f864ea08f6e0cedb483702194746906519ec4 (diff) | |
parent | e4be4ca4e052d77fbf7e19b7a88d4da1ad1aa64e (diff) | |
download | mediapointer-dvb-s2-5a13cb21630597799e7a398da33878568905020c.tar.gz mediapointer-dvb-s2-5a13cb21630597799e7a398da33878568905020c.tar.bz2 |
merge: http://linuxtv.org/hg/~tmerle/v4l-dvb/
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-core.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-video.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision.h | 1 |
3 files changed, 4 insertions, 6 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c index 996203969..96fcd5987 100644 --- a/linux/drivers/media/video/usbvision/usbvision-core.c +++ b/linux/drivers/media/video/usbvision/usbvision-core.c @@ -1611,13 +1611,10 @@ static int usbvision_write_reg_irq(struct usb_usbvision *usbvision,int address, if (len > 8) { return -EFAULT; } -// down(&usbvision->ctrlUrbLock); if (usbvision->ctrlUrbBusy) { -// up(&usbvision->ctrlUrbLock); return -EBUSY; } usbvision->ctrlUrbBusy = 1; -// up(&usbvision->ctrlUrbLock); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20) usbvision->ctrlUrbSetup.requesttype = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT; diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index 04a38c355..385b4709a 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -1339,7 +1339,8 @@ static int usbvision_radio_open(struct inode *inode, struct file *file) errCode = usbvision_set_alternate(usbvision); if (errCode < 0) { usbvision->last_error = errCode; - return -EBUSY; + errCode = -EBUSY; + goto out; } // If so far no errors then we shall start the radio @@ -1359,6 +1360,7 @@ static int usbvision_radio_open(struct inode *inode, struct file *file) usbvision->initialized = 0; } } +out: mutex_unlock(&usbvision->lock); return errCode; } @@ -1806,7 +1808,6 @@ static struct usb_usbvision *usbvision_alloc(struct usb_device *dev) goto err_exit; } init_waitqueue_head(&usbvision->ctrlUrb_wq); - init_MUTEX(&usbvision->ctrlUrbLock); /* to 1 == available */ usbvision_init_powerOffTimer(usbvision); @@ -1964,6 +1965,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf, usbvision->num_alt,GFP_KERNEL); if (usbvision->alt_max_pkt_size == NULL) { err("usbvision: out of memory!\n"); + mutex_unlock(&usbvision->lock); return -ENOMEM; } diff --git a/linux/drivers/media/video/usbvision/usbvision.h b/linux/drivers/media/video/usbvision/usbvision.h index 3b3f1ca0e..9f4c40dbf 100644 --- a/linux/drivers/media/video/usbvision/usbvision.h +++ b/linux/drivers/media/video/usbvision/usbvision.h @@ -373,7 +373,6 @@ struct usb_usbvision { int ctrlUrbBusy; struct usb_ctrlrequest ctrlUrbSetup; wait_queue_head_t ctrlUrb_wq; // Processes waiting - struct semaphore ctrlUrbLock; /* configuration part */ int have_tuner; |