diff options
Diffstat (limited to 'drivers/media/usb/gspca/vicam.c')
-rw-r--r-- | drivers/media/usb/gspca/vicam.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/usb/gspca/vicam.c b/drivers/media/usb/gspca/vicam.c index 57d88f70c399..d6890bc37198 100644 --- a/drivers/media/usb/gspca/vicam.c +++ b/drivers/media/usb/gspca/vicam.c | |||
@@ -110,7 +110,7 @@ static int vicam_set_camera_power(struct gspca_dev *gspca_dev, int state) | |||
110 | } | 110 | } |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * request and read a block of data - see warning on vicam_command. | 113 | * request and read a block of data |
114 | */ | 114 | */ |
115 | static int vicam_read_frame(struct gspca_dev *gspca_dev, u8 *data, int size) | 115 | static int vicam_read_frame(struct gspca_dev *gspca_dev, u8 *data, int size) |
116 | { | 116 | { |
@@ -170,14 +170,13 @@ static int vicam_read_frame(struct gspca_dev *gspca_dev, u8 *data, int size) | |||
170 | return 0; | 170 | return 0; |
171 | } | 171 | } |
172 | 172 | ||
173 | /* This function is called as a workqueue function and runs whenever the camera | 173 | /* |
174 | * This function is called as a workqueue function and runs whenever the camera | ||
174 | * is streaming data. Because it is a workqueue function it is allowed to sleep | 175 | * is streaming data. Because it is a workqueue function it is allowed to sleep |
175 | * so we can use synchronous USB calls. To avoid possible collisions with other | 176 | * so we can use synchronous USB calls. To avoid possible collisions with other |
176 | * threads attempting to use the camera's USB interface we take the gspca | 177 | * threads attempting to use gspca_dev->usb_buf we take the usb_lock when |
177 | * usb_lock when performing USB operations. In practice the only thing we need | 178 | * performing USB operations using it. In practice we don't really need this |
178 | * to protect against is the usb_set_interface call that gspca makes during | 179 | * as the cameras controls are only written from the workqueue. |
179 | * stream_off as the camera doesn't provide any controls that the user could try | ||
180 | * to change. | ||
181 | */ | 180 | */ |
182 | static void vicam_dostream(struct work_struct *work) | 181 | static void vicam_dostream(struct work_struct *work) |
183 | { | 182 | { |