Hello!

On 9/29/2017 3:08 AM, Kuninori Morimoto wrote:

From: Kuninori Morimoto <[email protected]>

SSI is using rsnd_ssi_flags_xxx() macro to control flags.
But it is useful macro not only for SSI. This patch replace it
to more generic rsnd_flags_xxx().

Signed-off-by: Kuninori Morimoto <[email protected]>
Tested-by: Hiroyuki Yokoyama <[email protected]>
---
  sound/soc/sh/rcar/rsnd.h |  4 ++++
  sound/soc/sh/rcar/ssi.c  | 27 ++++++++++++---------------
  2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index c5de71f..558200f 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -601,6 +601,10 @@ struct rsnd_priv {
  #define rsnd_is_gen1(priv)    (((priv)->flags & RSND_GEN_MASK) == RSND_GEN1)
  #define rsnd_is_gen2(priv)    (((priv)->flags & RSND_GEN_MASK) == RSND_GEN2)
+#define rsnd_flags_has(p, f) ((p)->flags & f)
+#define rsnd_flags_set(p, f) ((p)->flags |= f)
+#define rsnd_flags_del(p, f) ((p)->flags = ((p)->flags & ~f))

#define rsnd_flags_del(p, f) ((p)->flags &= ~f)

[...]

MBR, Sergei

Reply via email to