ALSA: hda - Fix invalid function call in snd_hda_add_vmaster()
[firefly-linux-kernel-4.4.55.git] / sound / pci / hda / hda_codec.c
index d91cb7f5961a41a00282fda7f93d622f93a38830..47a617786fcacd87ebee2f95fed266c280197808 100644 (file)
@@ -2831,6 +2831,12 @@ static int init_slave_unmute(struct hda_codec *codec,
        return put_kctl_with_value(slave, 1);
 }
 
+static int add_slave(struct hda_codec *codec,
+                    void *data, struct snd_kcontrol *slave)
+{
+       return snd_ctl_add_slave(data, slave);
+}
+
 /**
  * snd_hda_add_vmaster - create a virtual master control and add slaves
  * @codec: HD-audio codec
@@ -2873,8 +2879,7 @@ int __snd_hda_add_vmaster(struct hda_codec *codec, char *name,
        if (err < 0)
                return err;
 
-       err = map_slaves(codec, slaves, suffix,
-                        (map_slave_func_t)snd_ctl_add_slave, kctl);
+       err = map_slaves(codec, slaves, suffix, add_slave, kctl);
        if (err < 0)
                return err;