[alsa-devel] [PATCH 1/6] ASoC: rsnd: add generic rsnd_flags_xxx() macro

Sergei Shtylyov sergei.shtylyov at cogentembedded.com
Sat Sep 30 12:07:54 CEST 2017


Hello!

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

> From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> 
> 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 <kuninori.morimoto.gx at renesas.com>
> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx at renesas.com>
> ---
>   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


More information about the Alsa-devel mailing list