diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-04-10 08:50:50 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-27 20:57:39 +0100 |
commit | da620d722a7b7b16bf8571150acd7fd9e155809f (patch) | |
tree | 976b5a65713f8ec3cb9a8180162843e241fb7492 /sound/soc/sh | |
parent | 919567d914b3c134e60c01db72a03a0adc5f41b9 (diff) | |
download | op-kernel-dev-da620d722a7b7b16bf8571150acd7fd9e155809f.zip op-kernel-dev-da620d722a7b7b16bf8571150acd7fd9e155809f.tar.gz |
ASoC: rsnd: care snd_kcontrol's index
rsnd might be used in multi-codec sound card.
Then, same name kcontrol will be registered many times, and it will
be error. This patch fixes this issue by using .index
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/rcar/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 164653c..99eb109 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -839,12 +839,14 @@ static int __rsnd_kctrl_new(struct rsnd_mod *mod, struct rsnd_kctrl_cfg *cfg, void (*update)(struct rsnd_mod *mod)) { + struct snd_soc_card *soc_card = rtd->card; struct snd_card *card = rtd->card->snd_card; struct snd_kcontrol *kctrl; struct snd_kcontrol_new knew = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = name, .info = rsnd_kctrl_info, + .index = rtd - soc_card->rtd, .get = rsnd_kctrl_get, .put = rsnd_kctrl_put, .private_value = (unsigned long)cfg, |