summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8903.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-06-19 07:50:01 +0200
committerMark Brown <broonie@linaro.org>2014-06-19 10:55:38 +0100
commite73a2571988870372f7f2b6072a98f49e414be66 (patch)
treec5abb151c5262e4d75e1b509ba2ddf989b699697 /sound/soc/codecs/wm8903.c
parent5c3fc7a79aae474670096d73da21aec9f0750abb (diff)
downloadlinux-e73a2571988870372f7f2b6072a98f49e414be66.tar.bz2
ASoC: wm5100/wm8903/wm8996: Replace open-coded snd_soc_dapm_to_codec()
We now have a generic helper function to cast from a DAPM context to a CODEC. Make use of it in the places which previously open-coded it. 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/wm8903.c')
-rw-r--r--sound/soc/codecs/wm8903.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index b0084a127d18..2116e79085ec 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -281,8 +281,7 @@ static int wm8903_dcs_event(struct snd_soc_dapm_widget *w,
static void wm8903_seq_notifier(struct snd_soc_dapm_context *dapm,
enum snd_soc_dapm_type event, int subseq)
{
- struct snd_soc_codec *codec = container_of(dapm,
- struct snd_soc_codec, dapm);
+ struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
int dcs_mode = WM8903_DCS_MODE_WRITE_STOP;
int i, val;