summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm5102.c
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>2016-04-27 15:58:28 +0200
committerMark Brown <broonie@kernel.org>2016-04-27 17:21:23 +0200
commit401cf1466a59139ec1805e2171d43a32be92f89c (patch)
treedbbc9e4531550ed542a954663a8c13a8f50274dd /sound/soc/codecs/wm5102.c
parentASoC: wm_adsp: free memory when unloaded or closed (diff)
downloadlinux-401cf1466a59139ec1805e2171d43a32be92f89c.tar.xz
linux-401cf1466a59139ec1805e2171d43a32be92f89c.zip
ASoC: arizona: call wm_adsp2_remove when codec driver is removed
Ensure that the wm_adsp driver cleans up when the codec driver is removed. 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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index a8b3e3f701f9..7a539e0529c0 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -2093,10 +2093,14 @@ static int wm5102_probe(struct platform_device *pdev)
static int wm5102_remove(struct platform_device *pdev)
{
+ struct wm5102_priv *wm5102 = platform_get_drvdata(pdev);
+
snd_soc_unregister_platform(&pdev->dev);
snd_soc_unregister_codec(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+ wm_adsp2_remove(&wm5102->core.adsp[0]);
+
return 0;
}