summaryrefslogtreecommitdiff
path: root/drivers/media/video/pwc/pwc-if.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-07-03 14:50:51 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 20:53:45 (GMT)
commitc11271349ad5d4647e69e511fc481b2dd390efc4 (patch)
treebc9ecda60fb903856dae5e21271e449e203a14bc /drivers/media/video/pwc/pwc-if.c
parent6c9cac89c009c049a9ad29cdf0f51892410fe751 (diff)
downloadlinux-fsl-qoriq-c11271349ad5d4647e69e511fc481b2dd390efc4.tar.xz
[media] pwc: Allow dqbuf / read to complete while waiting for controls
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc/pwc-if.c')
-rw-r--r--drivers/media/video/pwc/pwc-if.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 1d5a6db..fdf113f 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1160,6 +1160,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
pwc_construct(pdev); /* set min/max sizes correct */
mutex_init(&pdev->modlock);
+ mutex_init(&pdev->udevlock);
spin_lock_init(&pdev->queued_bufs_lock);
INIT_LIST_HEAD(&pdev->queued_bufs);
@@ -1297,6 +1298,7 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
{
struct pwc_device *pdev = usb_get_intfdata(intf);
+ mutex_lock(&pdev->udevlock);
mutex_lock(&pdev->modlock);
usb_set_intfdata(intf, NULL);
@@ -1306,6 +1308,7 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
pdev->udev = NULL;
mutex_unlock(&pdev->modlock);
+ mutex_unlock(&pdev->udevlock);
pwc_remove_sysfs_files(pdev);
video_unregister_device(&pdev->vdev);