summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-10-22 03:14:02 +0000
committerMark Brown <broonie@kernel.org>2015-10-22 13:30:01 +0100
commit1355720a3b3eba5604431d89d5cf69ce4ad51311 (patch)
tree60d70093344f88a4b7f21b96a15c1b6ff9431d89 /sound
parentb05ce4c0916dec0e31a12c35a3386e3ca3ed989a (diff)
downloadop-kernel-dev-1355720a3b3eba5604431d89d5cf69ce4ad51311.zip
op-kernel-dev-1355720a3b3eba5604431d89d5cf69ce4ad51311.tar.gz
ASoC: rsnd: fixup rsnd_mod_call() behavior for debug
Indicating each module method as debug message before executing is readable/understandable. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sh/rcar/core.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 6ef9a88..c0182ac 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -308,16 +308,14 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
u8 val = (mod->status >> __rsnd_mod_shift_##func) & 0xF; \
u8 add = ((val + __rsnd_mod_add_##func) & 0xF); \
int ret = 0; \
- int called = 0; \
- if (val == __rsnd_mod_call_##func) { \
- called = 1; \
- ret = (mod)->ops->func(mod, io, param); \
- } \
+ int call = (val == __rsnd_mod_call_##func); \
mod->status = (mod->status & ~mask) + \
(add << __rsnd_mod_shift_##func); \
- dev_dbg(dev, "%s[%d] 0x%08x %s\n", \
- rsnd_mod_name(mod), rsnd_mod_id(mod), mod->status, \
- called ? #func : ""); \
+ dev_dbg(dev, "%s[%d]\t0x%08x %s\n", \
+ rsnd_mod_name(mod), rsnd_mod_id(mod), \
+ mod->status, call ? #func : ""); \
+ if (call) \
+ ret = (mod)->ops->func(mod, io, param); \
ret; \
})
OpenPOWER on IntegriCloud