mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
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
This commit is contained in:
parent
5d51fdd122
commit
2086e63b9b
@ -469,8 +469,8 @@ static int aica_pcmvolume_info(struct snd_kcontrol *kcontrol,
|
||||
static int aica_pcmvolume_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_card_aica *dreamcastcard;
|
||||
dreamcastcard = kcontrol->private_data;
|
||||
struct snd_card_aica *dreamcastcard = snd_kcontrol_chip(kcontrol);
|
||||
|
||||
if (unlikely(!dreamcastcard->channel))
|
||||
return -ETXTBSY; /* we've not yet been set up */
|
||||
ucontrol->value.integer.value[0] = dreamcastcard->channel->vol;
|
||||
@ -480,9 +480,9 @@ static int aica_pcmvolume_get(struct snd_kcontrol *kcontrol,
|
||||
static int aica_pcmvolume_put(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_card_aica *dreamcastcard;
|
||||
struct snd_card_aica *dreamcastcard = snd_kcontrol_chip(kcontrol);
|
||||
unsigned int vol;
|
||||
dreamcastcard = kcontrol->private_data;
|
||||
|
||||
if (unlikely(!dreamcastcard->channel))
|
||||
return -ETXTBSY;
|
||||
vol = ucontrol->value.integer.value[0];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user