From: Hans Verkuil Date: Mon, 9 Jan 2006 17:32:44 +0000 (-0200) Subject: V4L/DVB (3292): Fix signed/unsigned bug in brightness handling of cx25840 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0de71224d17f43101fa20696a8d7a78fb599557e;p=openwrt%2Fstaging%2Fblogic.git 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index b93495b2a1fb..29b378b6097d 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -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;