summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/usbvision/usbvision-video.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-07-20 14:59:38 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-11 11:55:26 +0200
commitdf3cfa6d9265f10fabc3c44f852d6b6bbf26029e (patch)
treea8cfc5c0f09439e8d1acfc7e88db3aed5973a12f /drivers/media/usb/usbvision/usbvision-video.c
parent[media] usbvision: fix standards for S-Video/Composite inputs (diff)
downloadlinux-df3cfa6d9265f10fabc3c44f852d6b6bbf26029e.tar.xz
linux-df3cfa6d9265f10fabc3c44f852d6b6bbf26029e.zip
[media] usbvision: move init code to probe()
These things are only initialized if you start streaming video, but they are also used in the disconnect function. So just init them always during probe time. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/usbvision/usbvision-video.c')
-rw-r--r--drivers/media/usb/usbvision/usbvision-video.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
index 6ad3d568d495..b693206f66dd 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -1520,6 +1520,10 @@ static int usbvision_probe(struct usb_interface *intf,
usbvision->nr = usbvision_nr++;
+ spin_lock_init(&usbvision->queue_lock);
+ init_waitqueue_head(&usbvision->wait_frame);
+ init_waitqueue_head(&usbvision->wait_stream);
+
usbvision->have_tuner = usbvision_device_data[model].tuner;
if (usbvision->have_tuner)
usbvision->tuner_type = usbvision_device_data[model].tuner_type;