summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/gspca/sn9c20x.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-09-09 12:30:02 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-13 22:52:58 +0200
commit844db450e6e2cf710752af1a019a877af390b541 (patch)
tree0c43bce1f503d14cabdad012ff00b6a9c6ad41b8 /drivers/media/usb/gspca/sn9c20x.c
parent[media] gspca_finepix: Remove unnecessary lock/unlock call (diff)
downloadlinux-844db450e6e2cf710752af1a019a877af390b541.tar.xz
linux-844db450e6e2cf710752af1a019a877af390b541.zip
[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/sn9c20x.c')
-rw-r--r--drivers/media/usb/gspca/sn9c20x.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c
index b9c6f17eabb2..41f769fe340c 100644
--- a/drivers/media/usb/gspca/sn9c20x.c
+++ b/drivers/media/usb/gspca/sn9c20x.c
@@ -2197,8 +2197,10 @@ static void qual_upd(struct work_struct *work)
struct gspca_dev *gspca_dev = &sd->gspca_dev;
s32 qual = v4l2_ctrl_g_ctrl(sd->jpegqual);
+ /* To protect gspca_dev->usb_buf and gspca_dev->usb_err */
mutex_lock(&gspca_dev->usb_lock);
PDEBUG(D_STREAM, "qual_upd %d%%", qual);
+ gspca_dev->usb_err = 0;
set_quality(gspca_dev, qual);
mutex_unlock(&gspca_dev->usb_lock);
}