aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc/pwc-ctrl.c
diff options
context:
space:
mode:
authorMartin Fuzzey <mfuzzey@gmail.com>2010-02-11 08:50:31 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-19 00:19:02 -0500
commit53f68607caba85db9a73846ccd289e4b7fa96295 (patch)
tree1dbca5973bac252dce3bd7477a178982f760c5f0 /drivers/media/video/pwc/pwc-ctrl.c
parent2b59125b1b5f8c9bb0524b8a0bdad4b780a239ac (diff)
V4L/DVB: Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion.
Regression was caused by my commit 6b35ca0d3d586b8ecb8396821af21186e20afaf0 which determined message size using sizeof rather than hardcoded constants. Unfortunately pwc_set_shutter_speed reuses a 2 byte buffer for a one byte message too so the sizeof was bogus in this case. All other uses of sizeof checked and are ok. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: stable@kernel.org Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc/pwc-ctrl.c')
-rw-r--r--drivers/media/video/pwc/pwc-ctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/video/pwc/pwc-ctrl.c
index 50b415e07eda..f7f7e04cf485 100644
--- a/drivers/media/video/pwc/pwc-ctrl.c
+++ b/drivers/media/video/pwc/pwc-ctrl.c
@@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value)
753 buf[0] = 0xff; /* fixed */ 753 buf[0] = 0xff; /* fixed */
754 754
755 ret = send_control_msg(pdev, 755 ret = send_control_msg(pdev,
756 SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, sizeof(buf)); 756 SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, 1);
757 757
758 if (!mode && ret >= 0) { 758 if (!mode && ret >= 0) {
759 if (value < 0) 759 if (value < 0)