diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-01-23 18:38:08 -0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-03 12:41:15 +0000 |
commit | 92d9587ede108a7e73f80d0767aedf2c4edb47d8 (patch) | |
tree | d7498592ba2fb76e67c483d33c81695a80590f43 /sound/soc/sh/rcar/rsnd.h | |
parent | 0290d2a42cb476358303d05fbe2475dd50889907 (diff) | |
download | linux-92d9587ede108a7e73f80d0767aedf2c4edb47d8.tar.gz linux-92d9587ede108a7e73f80d0767aedf2c4edb47d8.tar.bz2 linux-92d9587ede108a7e73f80d0767aedf2c4edb47d8.zip |
ASoC: rsnd: cleanup debug information method
rsnd_mod debug information is implemented
in each callback functions now.
But, it can be implemented in rsnd_mod_call(),
and share this code.
This patch adds it
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/rsnd.h')
-rw-r--r-- | sound/soc/sh/rcar/rsnd.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index f62b9eb274e1..faacdcb8f05b 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -152,10 +152,19 @@ struct rsnd_mod { #define rsnd_mod_id(mod) ((mod)->id) #define for_each_rsnd_mod(pos, n, io) \ list_for_each_entry_safe(pos, n, &(io)->head, list) +#define __rsnd_mod_call(mod, func, rdai, io) \ +({ \ + struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \ + struct device *dev = rsnd_priv_to_dev(priv); \ + dev_dbg(dev, "%s-%d-%s\n", \ + rsnd_mod_name(mod), rsnd_mod_id(mod), #func); \ + (mod)->ops->func(mod, rdai, io); \ +}) + #define rsnd_mod_call(mod, func, rdai, io) \ (!(mod) ? -ENODEV : \ !((mod)->ops->func) ? 0 : \ - (mod)->ops->func(mod, rdai, io)) + __rsnd_mod_call(mod, func, rdai, io)) void rsnd_mod_init(struct rsnd_priv *priv, struct rsnd_mod *mod, |