summaryrefslogtreecommitdiff
path: root/sound/soc/sh/rcar/dvc.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-09-10 07:02:21 (GMT)
committerMark Brown <broonie@kernel.org>2015-09-14 18:47:31 (GMT)
commitb76e218ae5e5e8d8025b75066e82ad0674e2e845 (patch)
treeab4c3b3f6063027098d8356c09407830e976a833 /sound/soc/sh/rcar/dvc.c
parentac37a45b0b6c8400719bb837f1c321079b72db53 (diff)
downloadlinux-b76e218ae5e5e8d8025b75066e82ad0674e2e845.tar.xz
ASoC: rsnd: add rsnd_mod_get() macro and use it
Renesas sound driver has SSI/SRC/DVC/CTU/MIX, and these are controlled as modules. And these module are member of each modules's private data. It used own method to get module pointer, but Let's use common method Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/dvc.c')
-rw-r--r--sound/soc/sh/rcar/dvc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
index 5779638..8d8eee6 100644
--- a/sound/soc/sh/rcar/dvc.c
+++ b/sound/soc/sh/rcar/dvc.c
@@ -282,7 +282,7 @@ struct rsnd_mod *rsnd_dvc_mod_get(struct rsnd_priv *priv, int id)
if (WARN_ON(id < 0 || id >= rsnd_dvc_nr(priv)))
id = 0;
- return &((struct rsnd_dvc *)(priv->dvc) + id)->mod;
+ return rsnd_mod_get((struct rsnd_dvc *)(priv->dvc) + id);
}
static void rsnd_of_parse_dvc(struct platform_device *pdev,
@@ -361,7 +361,7 @@ int rsnd_dvc_probe(struct platform_device *pdev,
dvc->info = &info->dvc_info[i];
- ret = rsnd_mod_init(priv, &dvc->mod, &rsnd_dvc_ops,
+ ret = rsnd_mod_init(priv, rsnd_mod_get(dvc), &rsnd_dvc_ops,
clk, RSND_MOD_DVC, i);
if (ret)
return ret;
@@ -377,6 +377,6 @@ void rsnd_dvc_remove(struct platform_device *pdev,
int i;
for_each_rsnd_dvc(dvc, priv, i) {
- rsnd_mod_quit(&dvc->mod);
+ rsnd_mod_quit(rsnd_mod_get(dvc));
}
}