aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/gspca/sq905c.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-09-09 06:30:02 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-13 16:52:58 -0400
commit844db450e6e2cf710752af1a019a877af390b541 (patch)
tree0c43bce1f503d14cabdad012ff00b6a9c6ad41b8 /drivers/media/usb/gspca/sq905c.c
parentff8f25d326da5e7cf6216f368116744341fceb12 (diff)
[media] gspca: Update / fix various comments wrt workqueue usb_lock usage
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/gspca/sq905c.c')
-rw-r--r--drivers/media/usb/gspca/sq905c.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/usb/gspca/sq905c.c b/drivers/media/usb/gspca/sq905c.c
index 784620c102b1..410cdcbb55d4 100644
--- a/drivers/media/usb/gspca/sq905c.c
+++ b/drivers/media/usb/gspca/sq905c.c
@@ -123,15 +123,13 @@ static int sq905c_read(struct gspca_dev *gspca_dev, u16 command, u16 index,
123 return 0; 123 return 0;
124} 124}
125 125
126/* This function is called as a workqueue function and runs whenever the camera 126/*
127 * This function is called as a workqueue function and runs whenever the camera
127 * is streaming data. Because it is a workqueue function it is allowed to sleep 128 * is streaming data. Because it is a workqueue function it is allowed to sleep
128 * so we can use synchronous USB calls. To avoid possible collisions with other 129 * so we can use synchronous USB calls. To avoid possible collisions with other
129 * threads attempting to use the camera's USB interface the gspca usb_lock is 130 * threads attempting to use gspca_dev->usb_buf we take the usb_lock when
130 * used when performing the one USB control operation inside the workqueue, 131 * performing USB operations using it. In practice we don't really need this
131 * which tells the camera to close the stream. In practice the only thing 132 * as the camera doesn't provide any controls.
132 * which needs to be protected against is the usb_set_interface call that
133 * gspca makes during stream_off. Otherwise the camera doesn't provide any
134 * controls that the user could try to change.
135 */ 133 */
136static void sq905c_dostream(struct work_struct *work) 134static void sq905c_dostream(struct work_struct *work)
137{ 135{