Skip to content

Commit 65468d1

Browse files
morimototiwai
authored andcommitted
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
1 parent 9aedbdf commit 65468d1

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

sound/pci/asihpi/asihpi.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2300,8 +2300,7 @@ static const char * const sampleclock_sources[] = {
23002300
static int snd_asihpi_clksrc_info(struct snd_kcontrol *kcontrol,
23012301
struct snd_ctl_elem_info *uinfo)
23022302
{
2303-
struct snd_card_asihpi *asihpi =
2304-
(struct snd_card_asihpi *)(kcontrol->private_data);
2303+
struct snd_card_asihpi *asihpi = snd_kcontrol_chip(kcontrol);
23052304
struct clk_cache *clkcache = &asihpi->cc;
23062305
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
23072306
uinfo->count = 1;
@@ -2319,8 +2318,7 @@ static int snd_asihpi_clksrc_info(struct snd_kcontrol *kcontrol,
23192318
static int snd_asihpi_clksrc_get(struct snd_kcontrol *kcontrol,
23202319
struct snd_ctl_elem_value *ucontrol)
23212320
{
2322-
struct snd_card_asihpi *asihpi =
2323-
(struct snd_card_asihpi *)(kcontrol->private_data);
2321+
struct snd_card_asihpi *asihpi = snd_kcontrol_chip(kcontrol);
23242322
struct clk_cache *clkcache = &asihpi->cc;
23252323
u32 h_control = kcontrol->private_value;
23262324
u16 source, srcindex = 0;
@@ -2347,8 +2345,7 @@ static int snd_asihpi_clksrc_get(struct snd_kcontrol *kcontrol,
23472345
static int snd_asihpi_clksrc_put(struct snd_kcontrol *kcontrol,
23482346
struct snd_ctl_elem_value *ucontrol)
23492347
{
2350-
struct snd_card_asihpi *asihpi =
2351-
(struct snd_card_asihpi *)(kcontrol->private_data);
2348+
struct snd_card_asihpi *asihpi = snd_kcontrol_chip(kcontrol);
23522349
struct clk_cache *clkcache = &asihpi->cc;
23532350
unsigned int item;
23542351
int change;

0 commit comments

Comments
 (0)