summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm5102.c
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>2015-06-11 11:32:30 +0100
committerMark Brown <broonie@kernel.org>2015-06-11 11:39:39 +0100
commitf5e2ce92bd96df99de1ef33fad05e3b3b2d34e54 (patch)
treef6875032600a2adee9ed607be4f9bf9922994f74 /sound/soc/codecs/wm5102.c
parent69a6582eeb17dc083b2510f1ca2eaa54ff679b49 (diff)
ASoC: wm_adsp: Add codec_probe and codec_remove stubs
Currently the only init function in wm_adsp is called by the codec driver early in its probe before the codec has been registered with SOC. This patch adds stubs for the codec_probe and codec_remove stages and calls them from WM5102 and WM5110 codec drivers. This allows us to hang anything that needs setup during the codec probe stage off these functions without further modification of the codec drivers. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm5102.c')
-rw-r--r--sound/soc/codecs/wm5102.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index 11eba0e58fc0..341d96e3376c 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -1875,6 +1875,10 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec)
struct wm5102_priv *priv = snd_soc_codec_get_drvdata(codec);
int ret;
+ ret = wm_adsp2_codec_probe(&priv->core.adsp[0], codec);
+ if (ret)
+ return ret;
+
ret = snd_soc_add_codec_controls(codec, wm_adsp2_fw_controls, 2);
if (ret != 0)
return ret;
@@ -1893,6 +1897,8 @@ static int wm5102_codec_remove(struct snd_soc_codec *codec)
{
struct wm5102_priv *priv = snd_soc_codec_get_drvdata(codec);
+ wm_adsp2_codec_remove(&priv->core.adsp[0], codec);
+
priv->core.arizona->dapm = NULL;
return 0;