summaryrefslogtreecommitdiff
path: root/sound/soc/sh/rcar/dvc.c
diff options
context:
space:
mode:
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 d7f9ed959c4e..261997a3f589 100644
--- a/sound/soc/sh/rcar/dvc.c
+++ b/sound/soc/sh/rcar/dvc.c
@@ -333,7 +333,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);
@@ -366,11 +366,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);
+ }
+}