提交 53f68607 编写于 作者: M Martin Fuzzey 提交者: Mauro Carvalho Chehab

V4L/DVB: Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad...

V4L/DVB: Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad 	constant => sizeof conversion.

Regression was caused by my commit 6b35ca0d
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: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@kernel.org
Signed-off-by: NMartin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 2b59125b
...@@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value) ...@@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value)
buf[0] = 0xff; /* fixed */ buf[0] = 0xff; /* fixed */
ret = send_control_msg(pdev, ret = send_control_msg(pdev,
SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, sizeof(buf)); SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, 1);
if (!mode && ret >= 0) { if (!mode && ret >= 0) {
if (value < 0) if (value < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册