Skip to content

Commit 2086e63

Browse files
morimototiwai
authored andcommitted
ALSA: sh: 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/87v7qdaue4.wl-kuninori.morimoto.gx@renesas.com
1 parent 5d51fdd commit 2086e63

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sound/sh/aica.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ static int aica_pcmvolume_info(struct snd_kcontrol *kcontrol,
469469
static int aica_pcmvolume_get(struct snd_kcontrol *kcontrol,
470470
struct snd_ctl_elem_value *ucontrol)
471471
{
472-
struct snd_card_aica *dreamcastcard;
473-
dreamcastcard = kcontrol->private_data;
472+
struct snd_card_aica *dreamcastcard = snd_kcontrol_chip(kcontrol);
473+
474474
if (unlikely(!dreamcastcard->channel))
475475
return -ETXTBSY; /* we've not yet been set up */
476476
ucontrol->value.integer.value[0] = dreamcastcard->channel->vol;
@@ -480,9 +480,9 @@ static int aica_pcmvolume_get(struct snd_kcontrol *kcontrol,
480480
static int aica_pcmvolume_put(struct snd_kcontrol *kcontrol,
481481
struct snd_ctl_elem_value *ucontrol)
482482
{
483-
struct snd_card_aica *dreamcastcard;
483+
struct snd_card_aica *dreamcastcard = snd_kcontrol_chip(kcontrol);
484484
unsigned int vol;
485-
dreamcastcard = kcontrol->private_data;
485+
486486
if (unlikely(!dreamcastcard->channel))
487487
return -ETXTBSY;
488488
vol = ucontrol->value.integer.value[0];

0 commit comments

Comments
 (0)