[media] cx18: use v4l2_g/s_ctrl instead of the g/s_ctrl ops
authorHans Verkuil <hans.verkuil@cisco.com>
Sun, 3 Jul 2016 12:23:47 +0000 (09:23 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 12 Jul 2016 14:15:51 +0000 (11:15 -0300)
These ops are deprecated and should not be used anymore.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/cx18/cx18-alsa-mixer.c

index 341bddc00b774f5eb5338e224c55d6b8d973416a..284275270f1bb18d2a7b05045ab0c33919c05142 100644 (file)
@@ -93,7 +93,7 @@ static int snd_cx18_mixer_tv_vol_get(struct snd_kcontrol *kctl,
        vctrl.value = dB_to_cx18_av_vol(uctl->value.integer.value[0]);
 
        snd_cx18_lock(cxsc);
-       ret = v4l2_subdev_call(cx->sd_av, core, g_ctrl, &vctrl);
+       ret = v4l2_g_ctrl(cx->sd_av->ctrl_handler, &vctrl);
        snd_cx18_unlock(cxsc);
 
        if (!ret)
@@ -115,14 +115,14 @@ static int snd_cx18_mixer_tv_vol_put(struct snd_kcontrol *kctl,
        snd_cx18_lock(cxsc);
 
        /* Fetch current state */
-       ret = v4l2_subdev_call(cx->sd_av, core, g_ctrl, &vctrl);
+       ret = v4l2_g_ctrl(cx->sd_av->ctrl_handler, &vctrl);
 
        if (ret ||
            (cx18_av_vol_to_dB(vctrl.value) != uctl->value.integer.value[0])) {
 
                /* Set, if needed */
                vctrl.value = dB_to_cx18_av_vol(uctl->value.integer.value[0]);
-               ret = v4l2_subdev_call(cx->sd_av, core, s_ctrl, &vctrl);
+               ret = v4l2_s_ctrl(cx->sd_av->ctrl_handler, &vctrl);
                if (!ret)
                        ret = 1; /* Indicate control was changed w/o error */
        }