Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: ivtv: Fix incompatible type for argument error

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>

authored by

Bhumika Goyal and committed by
Mauro Carvalho Chehab
d088c310 b295eef9

+1 -1
+1 -1
drivers/media/pci/ivtv/ivtv-alsa-mixer.c
··· 156 156 157 157 strlcpy(sc->mixername, "CX2341[56] Mixer", sizeof(sc->mixername)); 158 158 159 - ret = snd_ctl_add(sc, snd_ctl_new1(snd_ivtv_mixer_tv_vol, itvsc)); 159 + ret = snd_ctl_add(sc, snd_ctl_new1(&snd_ivtv_mixer_tv_vol, itvsc)); 160 160 if (ret) { 161 161 IVTV_ALSA_WARN("%s: failed to add %s control, err %d\n", 162 162 __func__, snd_ivtv_mixer_tv_vol.name, ret);