Skip to content

Commit

Permalink
[media] wl12xx: g_volatile_ctrl fix: wrong field set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed May 25, 2011
1 parent c9d5d77 commit c6ae804
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/media/radio/radio-wl1273.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/radio/wl128x/fmdrv_v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c6ae804

Please sign in to comment.