Commit 0de71224 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (3292): Fix signed/unsigned bug in brightness handling of cx25840

- Fix signed/unsigned bug in brightness handling (set to 0 and 128 was returned).
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@brturbo.com.br>
parent c5099a64
...@@ -457,7 +457,7 @@ static int get_v4lctrl(struct i2c_client *client, struct v4l2_control *ctrl) ...@@ -457,7 +457,7 @@ static int get_v4lctrl(struct i2c_client *client, struct v4l2_control *ctrl)
ctrl->value = state->pvr150_workaround; ctrl->value = state->pvr150_workaround;
break; break;
case V4L2_CID_BRIGHTNESS: case V4L2_CID_BRIGHTNESS:
ctrl->value = cx25840_read(client, 0x414) + 128; ctrl->value = (s8)cx25840_read(client, 0x414) + 128;
break; break;
case V4L2_CID_CONTRAST: case V4L2_CID_CONTRAST:
ctrl->value = cx25840_read(client, 0x415) >> 1; ctrl->value = cx25840_read(client, 0x415) >> 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment