summaryrefslogtreecommitdiff
path: root/sound/soc/sh/rcar/dvc.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-03-28 02:00:39 +0300
committerMark Brown <broonie@kernel.org>2015-03-28 02:00:39 +0300
commitf8d04e7d91f86c61dbb096d81b99cd692b87fa19 (patch)
tree591ab0bb2a0c7145fd5c299028db97be7398c789 /sound/soc/sh/rcar/dvc.c
parentaf7e2be96623785816c1a6e521307b7af11ad016 (diff)
parent2f78dd7f40264697afed4c2ac0890df8f0588e49 (diff)
downloadlinux-f8d04e7d91f86c61dbb096d81b99cd692b87fa19.tar.xz
Merge branch 'asoc-fix-rcar' into HEAD
Diffstat (limited to 'sound/soc/sh/rcar/dvc.c')
-rw-r--r--sound/soc/sh/rcar/dvc.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
index 6d85e36c6c2b..aab45267e508 100644
--- a/sound/soc/sh/rcar/dvc.c
+++ b/sound/soc/sh/rcar/dvc.c
@@ -345,7 +345,7 @@ int rsnd_dvc_probe(struct platform_device *pdev,
struct rsnd_dvc *dvc;
struct clk *clk;
char name[RSND_DVC_NAME_SIZE];
- int i, nr;
+ int i, nr, ret;
rsnd_of_parse_dvc(pdev, of_data, priv);
@@ -378,11 +378,24 @@ int rsnd_dvc_probe(struct platform_device *pdev,
dvc->info = &info->dvc_info[i];
- rsnd_mod_init(&dvc->mod, &rsnd_dvc_ops,
+ ret = rsnd_mod_init(&dvc->mod, &rsnd_dvc_ops,
clk, RSND_MOD_DVC, i);
+ if (ret)
+ return ret;
dev_dbg(dev, "CMD%d probed\n", i);
}
return 0;
}
+
+void rsnd_dvc_remove(struct platform_device *pdev,
+ struct rsnd_priv *priv)
+{
+ struct rsnd_dvc *dvc;
+ int i;
+
+ for_each_rsnd_dvc(dvc, priv, i) {
+ rsnd_mod_quit(&dvc->mod);
+ }
+}