diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-05-22 23:25:43 -0700 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-26 14:34:55 +0100 |
commit | 8aefda5046f417c551e3acdeb2cf37949a4b75e9 (patch) | |
tree | df2f55e902e7cd76d85c17b89d0e151bb2907e66 /sound/soc/sh/rcar/src.c | |
parent | 033e7ed85b8513db4efacbdf0f22db2bed4ff405 (diff) | |
download | op-kernel-dev-8aefda5046f417c551e3acdeb2cf37949a4b75e9.zip op-kernel-dev-8aefda5046f417c551e3acdeb2cf37949a4b75e9.tar.gz |
ASoC: rsnd: module name is unified
Renesas sound driver uses many modules (= SSI/SRC/DVC),
and each module had own name.
But, each module name can be used as several purpose,
like clock name, DMA name etc...
This patch uses common name for each module.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/sh/rcar/src.c')
-rw-r--r-- | sound/soc/sh/rcar/src.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index c5ddbcc..4b5671b 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -10,6 +10,8 @@ */ #include "rsnd.h" +#define SRC_NAME "src" + struct rsnd_src { struct rsnd_src_platform_info *info; /* rcar_snd.h */ struct rsnd_mod mod; @@ -389,6 +391,17 @@ static int rsnd_src_set_convert_rate_gen1(struct rsnd_mod *mod, return 0; } +static int rsnd_src_probe_gen1(struct rsnd_mod *mod, + struct rsnd_dai *rdai) +{ + struct rsnd_priv *priv = rsnd_mod_to_priv(mod); + struct device *dev = rsnd_priv_to_dev(priv); + + dev_dbg(dev, "%s (Gen1) is probed\n", rsnd_mod_name(mod)); + + return 0; +} + static int rsnd_src_init_gen1(struct rsnd_mod *mod, struct rsnd_dai *rdai) { @@ -434,7 +447,8 @@ static int rsnd_src_stop_gen1(struct rsnd_mod *mod, } static struct rsnd_mod_ops rsnd_src_gen1_ops = { - .name = "sru (gen1)", + .name = SRC_NAME, + .probe = rsnd_src_probe_gen1, .init = rsnd_src_init_gen1, .quit = rsnd_src_quit, .start = rsnd_src_start_gen1, @@ -498,6 +512,8 @@ static int rsnd_src_probe_gen2(struct rsnd_mod *mod, if (ret < 0) dev_err(dev, "SRC DMA failed\n"); + dev_dbg(dev, "%s (Gen2) is probed\n", rsnd_mod_name(mod)); + return ret; } @@ -558,7 +574,7 @@ static int rsnd_src_stop_gen2(struct rsnd_mod *mod, } static struct rsnd_mod_ops rsnd_src_gen2_ops = { - .name = "src (gen2)", + .name = SRC_NAME, .probe = rsnd_src_probe_gen2, .remove = rsnd_src_remove_gen2, .init = rsnd_src_init_gen2, @@ -652,7 +668,8 @@ int rsnd_src_probe(struct platform_device *pdev, priv->src = src; for_each_rsnd_src(src, priv, i) { - snprintf(name, RSND_SRC_NAME_SIZE, "src.%d", i); + snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d", + SRC_NAME, i); clk = devm_clk_get(dev, name); if (IS_ERR(clk)) |