aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/sgtl5000.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-03-18 04:02:04 -0400
committerMark Brown <broonie@linaro.org>2014-04-14 12:22:43 -0400
commitea53bf77d147e7e560ac007fdaa30fb98c37c712 (patch)
treefb5917764aa5b2c0f4122708097446c3110541a0 /sound/soc/codecs/sgtl5000.c
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (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/sgtl5000.c')
-rw-r--r--sound/soc/codecs/sgtl5000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index d3ed1be5a186..b56caefcf664 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -296,7 +296,7 @@ static int dac_info_volsw(struct snd_kcontrol *kcontrol,
296static int dac_get_volsw(struct snd_kcontrol *kcontrol, 296static int dac_get_volsw(struct snd_kcontrol *kcontrol,
297 struct snd_ctl_elem_value *ucontrol) 297 struct snd_ctl_elem_value *ucontrol)
298{ 298{
299 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 299 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
300 int reg; 300 int reg;
301 int l; 301 int l;
302 int r; 302 int r;
@@ -349,7 +349,7 @@ static int dac_get_volsw(struct snd_kcontrol *kcontrol,
349static int dac_put_volsw(struct snd_kcontrol *kcontrol, 349static int dac_put_volsw(struct snd_kcontrol *kcontrol,
350 struct snd_ctl_elem_value *ucontrol) 350 struct snd_ctl_elem_value *ucontrol)
351{ 351{
352 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 352 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
353 int reg; 353 int reg;
354 int l; 354 int l;
355 int r; 355 int r;