From 3bc98ce6ea05a056facc4c5254c7a5725eea1e6c Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 3 Jan 2006 22:46:24 +0000 Subject: 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 --- linux/drivers/media/video/cx25840/cx25840-core.c | 2 +- v4l/ChangeLog | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index 890511cac..feb06c993 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -468,7 +468,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; diff --git a/v4l/ChangeLog b/v4l/ChangeLog index 3f9119e0d..d69d04381 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,11 @@ +2006-01-03 22:45 hverkuil + + * linux/drivers/media/video/cx25840/cx25840-core.c: (get_v4lctrl): + Fix signed/unsigned bug in brightness handling (set to 0 and 128 was + returned). + + Signed-off-by: Hans Verkuil + 2006-01-03 22:36 hverkuil * linux/drivers/media/video/cx25840/cx25840-core.c: (get_v4lctrl): -- cgit v1.2.3