media: ivtv: Fix incompatible type for argument error
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 16 Aug 2017 15:37:42 +0000 (11:37 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:26:33 +0000 (08:26 -0400)
The first argument of function snd_ctl_new1 is of type const struct
snd_kcontrol_new * but in this file the variable is passed by value
to this function. This generated ""incompatible type for argument"
error. So, pass the variable by reference.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/ivtv/ivtv-alsa-mixer.c

index ba372a23eb5c0538273a349ba8f75ec9c34e539b..aee453fcff37f992a28f233070b4a853f8b664be 100644 (file)
@@ -156,7 +156,7 @@ int __init snd_ivtv_mixer_create(struct snd_ivtv_card *itvsc)
 
        strlcpy(sc->mixername, "CX2341[56] Mixer", sizeof(sc->mixername));
 
-       ret = snd_ctl_add(sc, snd_ctl_new1(snd_ivtv_mixer_tv_vol, itvsc));
+       ret = snd_ctl_add(sc, snd_ctl_new1(&snd_ivtv_mixer_tv_vol, itvsc));
        if (ret) {
                IVTV_ALSA_WARN("%s: failed to add %s control, err %d\n",
                               __func__, snd_ivtv_mixer_tv_vol.name, ret);