From 5f7fb877be14da92803f0b5b60955e071ebe2d58 Mon Sep 17 00:00:00 2001 From: Thierry Date: Mon, 4 Dec 2006 08:31:17 -0300 Subject: V4L/DVB (4928): Usbvision_v4l2 robustness on disconnect This patch corrects 2 bugs (causes kernel oops) that occur when unplugging the peripheral whereas nobody has opened it yet : - do not call usbvision_stop_isoc if usbvision_init_isoc has not been called - do not call wakeup_interruptible on waitqueues that did not have been initialized with init_waitqueue_head Signed-off-by: Thierry MERLE Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/usbvision/usbvision.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/media/video/usbvision/usbvision.h') diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/video/usbvision/usbvision.h index 870c0cc81d8..ef83a5c4d2f 100644 --- a/drivers/media/video/usbvision/usbvision.h +++ b/drivers/media/video/usbvision/usbvision.h @@ -227,9 +227,10 @@ enum FrameState { /* stream states */ enum StreamState { - Stream_Off, - Stream_Interrupt, - Stream_On, + Stream_Off, /* Driver streaming is completely OFF */ + Stream_Idle, /* Driver streaming is ready to be put ON by the application */ + Stream_Interrupt, /* Driver streaming must be interrupted */ + Stream_On, /* Driver streaming is put ON by the application */ }; enum IsocState { -- cgit v1.2.3