Commit 6ddd5453 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] ivtv: use v4l2_g/s_ctrl instead of the g/s_ctrl ops

These ops are deprecated and should not be used anymore.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 5c030e44
...@@ -93,7 +93,7 @@ static int snd_ivtv_mixer_tv_vol_get(struct snd_kcontrol *kctl, ...@@ -93,7 +93,7 @@ static int snd_ivtv_mixer_tv_vol_get(struct snd_kcontrol *kctl,
vctrl.value = dB_to_cx25840_vol(uctl->value.integer.value[0]); vctrl.value = dB_to_cx25840_vol(uctl->value.integer.value[0]);
snd_ivtv_lock(itvsc); snd_ivtv_lock(itvsc);
ret = v4l2_subdev_call(itv->sd_audio, core, g_ctrl, &vctrl); ret = v4l2_g_ctrl(itv->sd_audio->ctrl_handler, &vctrl);
snd_ivtv_unlock(itvsc); snd_ivtv_unlock(itvsc);
if (!ret) if (!ret)
...@@ -115,14 +115,14 @@ static int snd_ivtv_mixer_tv_vol_put(struct snd_kcontrol *kctl, ...@@ -115,14 +115,14 @@ static int snd_ivtv_mixer_tv_vol_put(struct snd_kcontrol *kctl,
snd_ivtv_lock(itvsc); snd_ivtv_lock(itvsc);
/* Fetch current state */ /* Fetch current state */
ret = v4l2_subdev_call(itv->sd_audio, core, g_ctrl, &vctrl); ret = v4l2_g_ctrl(itv->sd_audio->ctrl_handler, &vctrl);
if (ret || if (ret ||
(cx25840_vol_to_dB(vctrl.value) != uctl->value.integer.value[0])) { (cx25840_vol_to_dB(vctrl.value) != uctl->value.integer.value[0])) {
/* Set, if needed */ /* Set, if needed */
vctrl.value = dB_to_cx25840_vol(uctl->value.integer.value[0]); vctrl.value = dB_to_cx25840_vol(uctl->value.integer.value[0]);
ret = v4l2_subdev_call(itv->sd_audio, core, s_ctrl, &vctrl); ret = v4l2_s_ctrl(itv->sd_audio->ctrl_handler, &vctrl);
if (!ret) if (!ret)
ret = 1; /* Indicate control was changed w/o error */ ret = 1; /* Indicate control was changed w/o error */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment