diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-09-09 10:30:02 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-13 20:52:58 (GMT) |
commit | 844db450e6e2cf710752af1a019a877af390b541 (patch) | |
tree | 0c43bce1f503d14cabdad012ff00b6a9c6ad41b8 /drivers/media/usb/gspca/finepix.c | |
parent | ff8f25d326da5e7cf6216f368116744341fceb12 (diff) | |
download | linux-844db450e6e2cf710752af1a019a877af390b541.tar.xz |
[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/finepix.c')
-rw-r--r-- | drivers/media/usb/gspca/finepix.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/usb/gspca/finepix.c b/drivers/media/usb/gspca/finepix.c index fb68a29..52bdb56 100644 --- a/drivers/media/usb/gspca/finepix.c +++ b/drivers/media/usb/gspca/finepix.c @@ -77,7 +77,14 @@ static int command(struct gspca_dev *gspca_dev, 12, FPIX_TIMEOUT); } -/* workqueue */ +/* + * This function is called as a workqueue function and runs whenever the camera + * is streaming data. Because it is a workqueue function it is allowed to sleep + * so we can use synchronous USB calls. To avoid possible collisions with other + * threads attempting to use gspca_dev->usb_buf we take the usb_lock when + * performing USB operations using it. In practice we don't really need this + * as the camera doesn't provide any controls. + */ static void dostream(struct work_struct *work) { struct usb_fpix *dev = container_of(work, struct usb_fpix, work_struct); |