ALSA: usb: mixer_quirks: use snd_kcontrol_chip()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 7 May 2025 05:00:12 +0000 (05:00 +0000)
committerTakashi Iwai <tiwai@suse.de>
Thu, 8 May 2025 09:53:35 +0000 (11:53 +0200)
We can use snd_kcontrol_chip(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/87h61xaucj.wl-kuninori.morimoto.gx@renesas.com
sound/usb/mixer_quirks.c

index 01091c3a83fcb6b0b7ac45cc23fc8c69b332ff17..2cabf3bf63d791f3e8d94f97c4b8378453046edc 100644 (file)
@@ -2000,7 +2000,7 @@ static int realtek_hda_get(struct snd_usb_audio *chip, u32 cmd, u32 *value)
 static int realtek_ctl_connector_get(struct snd_kcontrol *kcontrol,
                                     struct snd_ctl_elem_value *ucontrol)
 {
-       struct usb_mixer_elem_info *cval = kcontrol->private_data;
+       struct usb_mixer_elem_info *cval = snd_kcontrol_chip(kcontrol);
        struct snd_usb_audio *chip = cval->head.mixer->chip;
        u32 pv = kcontrol->private_value;
        u32 node_id = pv & 0xff;