summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/uvc
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-07-12 11:34:38 +0200
committerJean-Francois Moine <moinejf@free.fr>2008-07-12 11:34:38 +0200
commit5d9abf072da54a382d318a6a23bc4d65d1c9f6a7 (patch)
tree0091520c14854a60961fc21d8942a1cf32ffa56b /linux/drivers/media/video/uvc
parent0b44aa87bd1a08f0c6c64872413937415f5cc7e9 (diff)
parent5d6597046c8d57aa650a06343c4d63ba7dbe57dc (diff)
downloadmediapointer-dvb-s2-5d9abf072da54a382d318a6a23bc4d65d1c9f6a7.tar.gz
mediapointer-dvb-s2-5d9abf072da54a382d318a6a23bc4d65d1c9f6a7.tar.bz2
merge: from v4l-dvb
Diffstat (limited to 'linux/drivers/media/video/uvc')
-rw-r--r--linux/drivers/media/video/uvc/uvc_driver.c18
-rw-r--r--linux/drivers/media/video/uvc/uvc_v4l2.c2
2 files changed, 16 insertions, 4 deletions
diff --git a/linux/drivers/media/video/uvc/uvc_driver.c b/linux/drivers/media/video/uvc/uvc_driver.c
index 2c0b16960..f2b2983fe 100644
--- a/linux/drivers/media/video/uvc/uvc_driver.c
+++ b/linux/drivers/media/video/uvc/uvc_driver.c
@@ -1633,13 +1633,16 @@ static void uvc_disconnect(struct usb_interface *intf)
* reference to the uvc_device instance after uvc_v4l2_open() received
* the pointer to the device (video_devdata) but before it got the
* chance to increase the reference count (kref_get).
+ *
+ * Note that the reference can't be released with the lock held,
+ * otherwise a AB-BA deadlock can occur with videodev_lock that
+ * videodev acquires in videodev_open() and video_unregister_device().
*/
mutex_lock(&uvc_driver.open_mutex);
-
dev->state |= UVC_DEV_DISCONNECTED;
- kref_put(&dev->kref, uvc_delete);
-
mutex_unlock(&uvc_driver.open_mutex);
+
+ kref_put(&dev->kref, uvc_delete);
}
static int uvc_suspend(struct usb_interface *intf, pm_message_t message)
@@ -1826,6 +1829,15 @@ static struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_QUIRK_STREAM_NO_FID },
+ /* Asus F9SG */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x174f,
+ .idProduct = 0x8a31,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = 0,
+ .driver_info = UVC_QUIRK_STREAM_NO_FID },
/* Syntek (Asus U3S) */
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO,
diff --git a/linux/drivers/media/video/uvc/uvc_v4l2.c b/linux/drivers/media/video/uvc/uvc_v4l2.c
index 0456bbdcd..b5a11eb8f 100644
--- a/linux/drivers/media/video/uvc/uvc_v4l2.c
+++ b/linux/drivers/media/video/uvc/uvc_v4l2.c
@@ -1032,7 +1032,7 @@ static int uvc_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
{
struct video_device *vdev = video_devdata(file);
struct uvc_video_device *video = video_get_drvdata(vdev);
- struct uvc_buffer *buffer;
+ struct uvc_buffer *uninitialized_var(buffer);
struct page *page;
unsigned long addr, start, size;
unsigned int i;