diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2025-05-07 05:00:03 +0000 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2025-05-08 11:53:35 +0200 |
commit | 65468d1d3b15d948b8b73b49ec0341b27c5d3412 (patch) | |
tree | 950eb3f9bce44f41585f087f26fa2f4f28691f38 | |
parent | 9aedbdff5ff9545c60c72b2313f06fe95a57cc94 (diff) |
ALSA: pci: asihpi: 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/87jz6taucs.wl-kuninori.morimoto.gx@renesas.com
-rw-r--r-- | sound/pci/asihpi/asihpi.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index 65100f925b72..7e5ce96954b9 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c @@ -2300,8 +2300,7 @@ static const char * const sampleclock_sources[] = { static int snd_asihpi_clksrc_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { - struct snd_card_asihpi *asihpi = - (struct snd_card_asihpi *)(kcontrol->private_data); + struct snd_card_asihpi *asihpi = snd_kcontrol_chip(kcontrol); struct clk_cache *clkcache = &asihpi->cc; uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; @@ -2319,8 +2318,7 @@ static int snd_asihpi_clksrc_info(struct snd_kcontrol *kcontrol, static int snd_asihpi_clksrc_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_card_asihpi *asihpi = - (struct snd_card_asihpi *)(kcontrol->private_data); + struct snd_card_asihpi *asihpi = snd_kcontrol_chip(kcontrol); struct clk_cache *clkcache = &asihpi->cc; u32 h_control = kcontrol->private_value; u16 source, srcindex = 0; @@ -2347,8 +2345,7 @@ static int snd_asihpi_clksrc_get(struct snd_kcontrol *kcontrol, static int snd_asihpi_clksrc_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_card_asihpi *asihpi = - (struct snd_card_asihpi *)(kcontrol->private_data); + struct snd_card_asihpi *asihpi = snd_kcontrol_chip(kcontrol); struct clk_cache *clkcache = &asihpi->cc; unsigned int item; int change; |