diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-09-10 07:02:21 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-09-14 19:47:31 +0100 |
commit | b76e218ae5e5e8d8025b75066e82ad0674e2e845 (patch) | |
tree | ab4c3b3f6063027098d8356c09407830e976a833 /sound/soc/sh/rcar/ctu.c | |
parent | ac37a45b0b6c8400719bb837f1c321079b72db53 (diff) | |
download | op-kernel-dev-b76e218ae5e5e8d8025b75066e82ad0674e2e845.zip op-kernel-dev-b76e218ae5e5e8d8025b75066e82ad0674e2e845.tar.gz |
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/ctu.c')
-rw-r--r-- | sound/soc/sh/rcar/ctu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/ctu.c b/sound/soc/sh/rcar/ctu.c index 05498bb..a3e7c71 100644 --- a/sound/soc/sh/rcar/ctu.c +++ b/sound/soc/sh/rcar/ctu.c @@ -66,7 +66,7 @@ struct rsnd_mod *rsnd_ctu_mod_get(struct rsnd_priv *priv, int id) if (WARN_ON(id < 0 || id >= rsnd_ctu_nr(priv))) id = 0; - return &((struct rsnd_ctu *)(priv->ctu) + id)->mod; + return rsnd_mod_get((struct rsnd_ctu *)(priv->ctu) + id); } static void rsnd_of_parse_ctu(struct platform_device *pdev, @@ -150,7 +150,7 @@ int rsnd_ctu_probe(struct platform_device *pdev, ctu->info = &info->ctu_info[i]; - ret = rsnd_mod_init(priv, &ctu->mod, &rsnd_ctu_ops, + ret = rsnd_mod_init(priv, rsnd_mod_get(ctu), &rsnd_ctu_ops, clk, RSND_MOD_CTU, i); if (ret) return ret; @@ -166,6 +166,6 @@ void rsnd_ctu_remove(struct platform_device *pdev, int i; for_each_rsnd_ctu(ctu, priv, i) { - rsnd_mod_quit(&ctu->mod); + rsnd_mod_quit(rsnd_mod_get(ctu)); } } |