aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8940.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/wm8940.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/wm8940.c')
-rw-r--r--sound/soc/codecs/wm8940.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index 31e39ffd1d8..b2f12828630 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -580,7 +580,7 @@ static int wm8940_set_dai_sysclk(struct snd_soc_dai *codec_dai,
580 int clk_id, unsigned int freq, int dir) 580 int clk_id, unsigned int freq, int dir)
581{ 581{
582 struct snd_soc_codec *codec = codec_dai->codec; 582 struct snd_soc_codec *codec = codec_dai->codec;
583 struct wm8940_priv *wm8940 = codec->private_data; 583 struct wm8940_priv *wm8940 = snd_soc_codec_get_drvdata(codec);
584 584
585 switch (freq) { 585 switch (freq) {
586 case 11289600: 586 case 11289600:
@@ -772,7 +772,7 @@ static int wm8940_register(struct wm8940_priv *wm8940,
772 INIT_LIST_HEAD(&codec->dapm_widgets); 772 INIT_LIST_HEAD(&codec->dapm_widgets);
773 INIT_LIST_HEAD(&codec->dapm_paths); 773 INIT_LIST_HEAD(&codec->dapm_paths);
774 774
775 codec->private_data = wm8940; 775 snd_soc_codec_set_drvdata(codec, wm8940);
776 codec->name = "WM8940"; 776 codec->name = "WM8940";
777 codec->owner = THIS_MODULE; 777 codec->owner = THIS_MODULE;
778 codec->bias_level = SND_SOC_BIAS_OFF; 778 codec->bias_level = SND_SOC_BIAS_OFF;