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

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: pci: hda: use snd_kcontrol_chip()

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/87plglauda.wl-kuninori.morimoto.gx@renesas.com

authored by

Kuninori Morimoto and committed by
Takashi Iwai
483dd12d 792f318e

+6 -6
+6 -6
sound/pci/hda/cs35l56_hda.c
··· 179 179 static int cs35l56_hda_mixer_get(struct snd_kcontrol *kcontrol, 180 180 struct snd_ctl_elem_value *ucontrol) 181 181 { 182 - struct cs35l56_hda *cs35l56 = (struct cs35l56_hda *)kcontrol->private_data; 182 + struct cs35l56_hda *cs35l56 = snd_kcontrol_chip(kcontrol); 183 183 unsigned int reg_val; 184 184 int i; 185 185 ··· 201 201 static int cs35l56_hda_mixer_put(struct snd_kcontrol *kcontrol, 202 202 struct snd_ctl_elem_value *ucontrol) 203 203 { 204 - struct cs35l56_hda *cs35l56 = (struct cs35l56_hda *)kcontrol->private_data; 204 + struct cs35l56_hda *cs35l56 = snd_kcontrol_chip(kcontrol); 205 205 unsigned int item = ucontrol->value.enumerated.item[0]; 206 206 bool changed; 207 207 ··· 230 230 static int cs35l56_hda_posture_get(struct snd_kcontrol *kcontrol, 231 231 struct snd_ctl_elem_value *ucontrol) 232 232 { 233 - struct cs35l56_hda *cs35l56 = (struct cs35l56_hda *)kcontrol->private_data; 233 + struct cs35l56_hda *cs35l56 = snd_kcontrol_chip(kcontrol); 234 234 unsigned int pos; 235 235 int ret; 236 236 ··· 248 248 static int cs35l56_hda_posture_put(struct snd_kcontrol *kcontrol, 249 249 struct snd_ctl_elem_value *ucontrol) 250 250 { 251 - struct cs35l56_hda *cs35l56 = (struct cs35l56_hda *)kcontrol->private_data; 251 + struct cs35l56_hda *cs35l56 = snd_kcontrol_chip(kcontrol); 252 252 unsigned long pos = ucontrol->value.integer.value[0]; 253 253 bool changed; 254 254 int ret; ··· 297 297 static int cs35l56_hda_vol_get(struct snd_kcontrol *kcontrol, 298 298 struct snd_ctl_elem_value *ucontrol) 299 299 { 300 - struct cs35l56_hda *cs35l56 = (struct cs35l56_hda *)kcontrol->private_data; 300 + struct cs35l56_hda *cs35l56 = snd_kcontrol_chip(kcontrol); 301 301 unsigned int raw_vol; 302 302 int vol; 303 303 int ret; ··· 323 323 static int cs35l56_hda_vol_put(struct snd_kcontrol *kcontrol, 324 324 struct snd_ctl_elem_value *ucontrol) 325 325 { 326 - struct cs35l56_hda *cs35l56 = (struct cs35l56_hda *)kcontrol->private_data; 326 + struct cs35l56_hda *cs35l56 = snd_kcontrol_chip(kcontrol); 327 327 long vol = ucontrol->value.integer.value[0]; 328 328 unsigned int raw_vol; 329 329 bool changed;