diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-10-30 07:47:50 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-11-05 11:28:00 +0000 |
commit | c0ea089dbad47a41ae30ad290766d7a6571c9802 (patch) | |
tree | 1353e182bc8ea0d9196bebad71d154e8411126ea /sound/soc/sh/rcar/src.c | |
parent | c16015f36cc128244c910152663de45c3b99f551 (diff) | |
download | lwn-c0ea089dbad47a41ae30ad290766d7a6571c9802.tar.gz lwn-c0ea089dbad47a41ae30ad290766d7a6571c9802.zip |
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>
Diffstat (limited to 'sound/soc/sh/rcar/src.c')
-rw-r--r-- | sound/soc/sh/rcar/src.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 7de7afd6a3a6..bdc05952f75f 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -349,9 +349,8 @@ static bool rsnd_src_error_occurred(struct rsnd_mod *mod) status0 = rsnd_mod_read(mod, SCU_SYS_STATUS0); status1 = rsnd_mod_read(mod, SCU_SYS_STATUS1); if ((status0 & val0) || (status1 & val1)) { - rsnd_dbg_irq_status(dev, "%s[%d] err status : 0x%08x, 0x%08x\n", - rsnd_mod_name(mod), rsnd_mod_id(mod), - status0, status1); + rsnd_dbg_irq_status(dev, "%s err status : 0x%08x, 0x%08x\n", + rsnd_mod_name(mod), status0, status1); ret = true; } |