aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8580.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-04-14 02:35:19 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-04-16 21:46:22 -0400
commitb2c812e22de88bb79c290c0e718280f10b64a48d (patch)
tree4a5d967714cfb771db351cde525e6946897cca08 /sound/soc/codecs/wm8580.c
parent890c681275ab02623de1187f2d97fc355d76f372 (diff)
ASoC: Add indirection for CODEC private data
One of the features of the multi CODEC work is that it embeds a struct device in the CODEC to provide diagnostics via a sysfs class rather than via the device tree, at which point it's much better to use the struct device private data rather than having two places to store it. Provide an accessor function to allow this change to be made more easily, and update all the CODEC drivers are updated. To ensure use of the accessor the private data structure member is renamed, meaning that if code developed with older an older core that still uses private_data is merged it will fail to build. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/wm8580.c')
-rw-r--r--sound/soc/codecs/wm8580.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index d077df6f5e75..94b3f4c4d64e 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -411,7 +411,7 @@ static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
411{ 411{
412 int offset; 412 int offset;
413 struct snd_soc_codec *codec = codec_dai->codec; 413 struct snd_soc_codec *codec = codec_dai->codec;
414 struct wm8580_priv *wm8580 = codec->private_data; 414 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
415 struct pll_state *state; 415 struct pll_state *state;
416 struct _pll_div pll_div; 416 struct _pll_div pll_div;
417 unsigned int reg; 417 unsigned int reg;
@@ -839,7 +839,7 @@ static int wm8580_register(struct wm8580_priv *wm8580,
839 INIT_LIST_HEAD(&codec->dapm_widgets); 839 INIT_LIST_HEAD(&codec->dapm_widgets);
840 INIT_LIST_HEAD(&codec->dapm_paths); 840 INIT_LIST_HEAD(&codec->dapm_paths);
841 841
842 codec->private_data = wm8580; 842 snd_soc_codec_set_drvdata(codec, wm8580);
843 codec->name = "WM8580"; 843 codec->name = "WM8580";
844 codec->owner = THIS_MODULE; 844 codec->owner = THIS_MODULE;
845 codec->bias_level = SND_SOC_BIAS_OFF; 845 codec->bias_level = SND_SOC_BIAS_OFF;