]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (3292): Fix signed/unsigned bug in brightness handling of cx25840
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 9 Jan 2006 17:32:44 +0000 (15:32 -0200)
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>
Mon, 9 Jan 2006 17:32:44 +0000 (15:32 -0200)
- Fix signed/unsigned bug in brightness handling (set to 0 and 128 was returned).

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
drivers/media/video/cx25840/cx25840-core.c

index b93495b2a1fbea4e076be97306661162b99742b3..29b378b6097d6f546e338d9dbaca6c228ec05db8 100644 (file)
@@ -457,7 +457,7 @@ static int get_v4lctrl(struct i2c_client *client, struct v4l2_control *ctrl)
                ctrl->value = state->pvr150_workaround;
                break;
        case V4L2_CID_BRIGHTNESS:
-               ctrl->value = cx25840_read(client, 0x414) + 128;
+               ctrl->value = (s8)cx25840_read(client, 0x414) + 128;
                break;
        case V4L2_CID_CONTRAST:
                ctrl->value = cx25840_read(client, 0x415) >> 1;