From 8aefda5046f417c551e3acdeb2cf37949a4b75e9 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 22 May 2014 23:25:43 -0700 Subject: 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 Signed-off-by: Mark Brown --- sound/soc/sh/rcar/dvc.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'sound/soc/sh/rcar/dvc.c') diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c index 74769b1be005..ed0007006899 100644 --- a/sound/soc/sh/rcar/dvc.c +++ b/sound/soc/sh/rcar/dvc.c @@ -13,6 +13,9 @@ #define RSND_DVC_NAME_SIZE 16 #define RSND_DVC_VOLUME_MAX 100 #define RSND_DVC_VOLUME_NUM 2 + +#define DVC_NAME "dvc" + struct rsnd_dvc { struct rsnd_dvc_platform_info *info; /* rcar_snd.h */ struct rsnd_mod mod; @@ -43,6 +46,17 @@ static void rsnd_dvc_volume_update(struct rsnd_mod *mod) rsnd_mod_write(mod, DVC_VOL1R, vol[1]); } +static int rsnd_dvc_probe_gen2(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 (Gen2) is probed\n", rsnd_mod_name(mod)); + + return 0; +} + static int rsnd_dvc_init(struct rsnd_mod *dvc_mod, struct rsnd_dai *rdai) { @@ -208,7 +222,8 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod, } static struct rsnd_mod_ops rsnd_dvc_ops = { - .name = "dvc (gen2)", + .name = DVC_NAME, + .probe = rsnd_dvc_probe_gen2, .init = rsnd_dvc_init, .quit = rsnd_dvc_quit, .start = rsnd_dvc_start, @@ -255,7 +270,8 @@ int rsnd_dvc_probe(struct platform_device *pdev, priv->dvc = dvc; for_each_rsnd_dvc(dvc, priv, i) { - snprintf(name, RSND_DVC_NAME_SIZE, "dvc.%d", i); + snprintf(name, RSND_DVC_NAME_SIZE, "%s.%d", + DVC_NAME, i); clk = devm_clk_get(dev, name); if (IS_ERR(clk)) -- cgit v1.2.2