diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-03-18 04:02:04 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-14 12:22:43 -0400 |
commit | ea53bf77d147e7e560ac007fdaa30fb98c37c712 (patch) | |
tree | fb5917764aa5b2c0f4122708097446c3110541a0 /sound/soc/codecs/wm8996.c | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) |
ASoC: Add snd_soc_kcontrol_codec() helper function
For CODEC controls snd_kcontrol_chip() currently returns a pointer to the
CODEC that registered the control. With the upcoming consolidation of
platform and CODEC controls this will change. Prepare for this by introducing
the snd_soc_kcontrol_codec() helper function that will hide the implementation
details of how the CODEC for a control can be obtained. This will allow us to
change this easily in the future.
The patch also updates all CODEC drivers to use the new helper function.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/wm8996.c')
-rw-r--r-- | sound/soc/codecs/wm8996.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index c6cbb3b8ace9..69266332760e 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c | |||
@@ -412,7 +412,7 @@ static int wm8996_get_retune_mobile_block(const char *name) | |||
412 | static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, | 412 | static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, |
413 | struct snd_ctl_elem_value *ucontrol) | 413 | struct snd_ctl_elem_value *ucontrol) |
414 | { | 414 | { |
415 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 415 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); |
416 | struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); | 416 | struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); |
417 | struct wm8996_pdata *pdata = &wm8996->pdata; | 417 | struct wm8996_pdata *pdata = &wm8996->pdata; |
418 | int block = wm8996_get_retune_mobile_block(kcontrol->id.name); | 418 | int block = wm8996_get_retune_mobile_block(kcontrol->id.name); |
@@ -434,7 +434,7 @@ static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, | |||
434 | static int wm8996_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, | 434 | static int wm8996_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, |
435 | struct snd_ctl_elem_value *ucontrol) | 435 | struct snd_ctl_elem_value *ucontrol) |
436 | { | 436 | { |
437 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 437 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); |
438 | struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); | 438 | struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); |
439 | int block = wm8996_get_retune_mobile_block(kcontrol->id.name); | 439 | int block = wm8996_get_retune_mobile_block(kcontrol->id.name); |
440 | 440 | ||