ASoC: rsnd: rsnd_mod_name() handles both name and ID
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 30 Oct 2018 07:47:50 +0000 (07:47 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 5 Nov 2018 11:28:00 +0000 (11:28 +0000)
commitc0ea089dbad47a41ae30ad290766d7a6571c9802
tree1353e182bc8ea0d9196bebad71d154e8411126ea
parentc16015f36cc128244c910152663de45c3b99f551
ASoC: rsnd: rsnd_mod_name() handles both name and ID

Current rsnd driver is using "%s[%d]" for mod name and ID,
but, this ID portion might confusable.
For example currently, CTU ID is 0 to 7, but using 00 to 13
(= 00, 01, 02, 03, 10, 11, 12, 13) is very best matching to datasheet.

In the future, we will support BUSIFn, but it will be more complicated
numbering. To avoid future confusable code, this patch modify
rsnd_mod_name() to return understandable name.

To avoid using pointless memory, it uses static char and snprintf,
thus, rsnd_mod_name() user should use it immediately, and shouldn't keep
its pointer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/core.c
sound/soc/sh/rcar/dma.c
sound/soc/sh/rcar/gen.c
sound/soc/sh/rcar/rsnd.h
sound/soc/sh/rcar/src.c
sound/soc/sh/rcar/ssi.c