[media] wl12xx: g_volatile_ctrl fix: wrong field set
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 5 May 2011 07:37:28 +0000 (04:37 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 25 May 2011 10:51:48 +0000 (07:51 -0300)
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 <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/radio/radio-wl1273.c
drivers/media/radio/wl128x/fmdrv_v4l2.c

index e2550dc2944f939812805d2c23778c86df2ff7e0..9dbbd31b5ba231bc0f9ec687e11dbb3113a3ccd4 100644 (file)
@@ -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:
index d50e5ac75ab68659743be2005473db6789e89192..87010724f9147b53170dc59f1e603115ae2fd72c 100644 (file)
@@ -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);