From: Hans Verkuil Date: Thu, 5 May 2011 07:37:28 +0000 (-0300) Subject: [media] wl12xx: g_volatile_ctrl fix: wrong field set X-Git-Tag: v3.0-rc1~47^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6ae804a65649d5919d232d65dc6a08c9e5ac01b;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git [media] wl12xx: g_volatile_ctrl fix: wrong field set The function g_volatile_ctrl should change the current value rather than the new value. These two drivers didn't do that, so the value is never reported correctly. In the future this will change since this behavior is clearly unexpected, but for now fix these drivers first. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c index e2550dc..9dbbd31 100644 --- a/drivers/media/radio/radio-wl1273.c +++ b/drivers/media/radio/radio-wl1273.c @@ -1382,7 +1382,7 @@ static int wl1273_fm_g_volatile_ctrl(struct v4l2_ctrl *ctrl) switch (ctrl->id) { case V4L2_CID_TUNE_ANTENNA_CAPACITOR: - ctrl->val = wl1273_fm_get_tx_ctune(radio); + ctrl->cur.val = wl1273_fm_get_tx_ctune(radio); break; default: diff --git a/drivers/media/radio/wl128x/fmdrv_v4l2.c b/drivers/media/radio/wl128x/fmdrv_v4l2.c index d50e5ac..8701072 100644 --- a/drivers/media/radio/wl128x/fmdrv_v4l2.c +++ b/drivers/media/radio/wl128x/fmdrv_v4l2.c @@ -191,7 +191,7 @@ static int fm_g_volatile_ctrl(struct v4l2_ctrl *ctrl) switch (ctrl->id) { case V4L2_CID_TUNE_ANTENNA_CAPACITOR: - ctrl->val = fm_tx_get_tune_cap_val(fmdev); + ctrl->cur.val = fm_tx_get_tune_cap_val(fmdev); break; default: fmwarn("%s: Unknown IOCTL: %d\n", __func__, ctrl->id);