summaryrefslogtreecommitdiff
path: root/sound/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2025-05-07 04:59:15 +0000
committerTakashi Iwai <tiwai@suse.de>2025-05-08 11:53:34 +0200
commit2086e63b9b1499483efb7a63838061bb4cf27612 (patch)
treef6f3e7334b68f4b1275ce54577330f244617ef3d /sound/sh
parent5d51fdd122d7dcb1e1f7ef8ccd13d258bfd0b6b8 (diff)
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
Diffstat (limited to 'sound/sh')
-rw-r--r--sound/sh/aica.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index 5a93f4587356..f88331a48638 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -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];