提交 c6ae804a 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[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: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 c9d5d779
...@@ -1382,7 +1382,7 @@ static int wl1273_fm_g_volatile_ctrl(struct v4l2_ctrl *ctrl) ...@@ -1382,7 +1382,7 @@ static int wl1273_fm_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
switch (ctrl->id) { switch (ctrl->id) {
case V4L2_CID_TUNE_ANTENNA_CAPACITOR: case V4L2_CID_TUNE_ANTENNA_CAPACITOR:
ctrl->val = wl1273_fm_get_tx_ctune(radio); ctrl->cur.val = wl1273_fm_get_tx_ctune(radio);
break; break;
default: default:
......
...@@ -191,7 +191,7 @@ static int fm_g_volatile_ctrl(struct v4l2_ctrl *ctrl) ...@@ -191,7 +191,7 @@ static int fm_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
switch (ctrl->id) { switch (ctrl->id) {
case V4L2_CID_TUNE_ANTENNA_CAPACITOR: 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; break;
default: default:
fmwarn("%s: Unknown IOCTL: %d\n", __func__, ctrl->id); fmwarn("%s: Unknown IOCTL: %d\n", __func__, ctrl->id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册