diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-06-30 08:02:39 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-06-30 08:05:17 -0400 |
commit | e8750940ce345bf15fa0756810ae9ac491e9e352 (patch) | |
tree | d08d0791694cc7145fd302bb96b9400d09ee59f9 /sound/pci/hda/hda_codec.c | |
parent | 7e9c2eb62642680e331d91453f94c0073580a1b1 (diff) |
ALSA: hda - Fix invalid function call in snd_hda_add_vmaster()
The recent commit [6194b99d: ALSA: hda - Kill the rest of snd_print*()
usages] changed the callback map_slaves(), but one call was forgotten
to be replaced due to the cast, which leads to kernel Oops due to
invalid function. This patch replaces it with a proper function.
Fixes: 6194b99de9f5 ('ALSA: hda - Kill the rest of snd_print*() usages')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index d91cb7f5961a..47a617786fca 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -2831,6 +2831,12 @@ static int init_slave_unmute(struct hda_codec *codec, | |||
2831 | return put_kctl_with_value(slave, 1); | 2831 | return put_kctl_with_value(slave, 1); |
2832 | } | 2832 | } |
2833 | 2833 | ||
2834 | static int add_slave(struct hda_codec *codec, | ||
2835 | void *data, struct snd_kcontrol *slave) | ||
2836 | { | ||
2837 | return snd_ctl_add_slave(data, slave); | ||
2838 | } | ||
2839 | |||
2834 | /** | 2840 | /** |
2835 | * snd_hda_add_vmaster - create a virtual master control and add slaves | 2841 | * snd_hda_add_vmaster - create a virtual master control and add slaves |
2836 | * @codec: HD-audio codec | 2842 | * @codec: HD-audio codec |
@@ -2873,8 +2879,7 @@ int __snd_hda_add_vmaster(struct hda_codec *codec, char *name, | |||
2873 | if (err < 0) | 2879 | if (err < 0) |
2874 | return err; | 2880 | return err; |
2875 | 2881 | ||
2876 | err = map_slaves(codec, slaves, suffix, | 2882 | err = map_slaves(codec, slaves, suffix, add_slave, kctl); |
2877 | (map_slave_func_t)snd_ctl_add_slave, kctl); | ||
2878 | if (err < 0) | 2883 | if (err < 0) |
2879 | return err; | 2884 | return err; |
2880 | 2885 | ||