]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: rsnd: rsnd_scu_hpbif_is_enable() become macro
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 24 Jan 2014 02:40:54 +0000 (18:40 -0800)
committerMark Brown <broonie@linaro.org>
Mon, 3 Feb 2014 12:41:37 +0000 (12:41 +0000)
rsnd_scu_hpbif_is_enable() is used only scu.c now.
It can be local macro

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/sh/rcar/rsnd.h
sound/soc/sh/rcar/scu.c

index 33c01fb9f5fd31ee0762d886e19663cc012fe2e1..a9c58305e2f11030f91317a66d85175aeeb3158b 100644 (file)
@@ -303,7 +303,6 @@ int rsnd_scu_probe(struct platform_device *pdev,
 void rsnd_scu_remove(struct platform_device *pdev,
                     struct rsnd_priv *priv);
 struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id);
-bool rsnd_scu_hpbif_is_enable(struct rsnd_mod *mod);
 unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
                                   struct rsnd_mod *ssi_mod,
                                   struct snd_pcm_runtime *runtime);
index 8181ec55ad21f1126cd988971d7d04d0b905c1b7..2f839f72c99c7929e0420b27e970e330b8d056cb 100644 (file)
@@ -31,6 +31,8 @@ struct rsnd_scu {
 #define rsnd_scu_convert_rate(p) ((p)->info->convert_rate)
 #define rsnd_mod_to_scu(_mod)                          \
        container_of((_mod), struct rsnd_scu, mod)
+#define rsnd_scu_hpbif_is_enable(scu)  \
+       (rsnd_scu_mode_flags(scu) & RSND_SCU_USE_HPBIF)
 
 #define for_each_rsnd_scu(pos, priv, i)                                \
        for ((i) = 0;                                           \
@@ -113,13 +115,14 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
                                  struct rsnd_dai_stream *io)
 {
        struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
+       struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
        int id = rsnd_mod_id(mod);
 
        /*
         * SSI_MODE0
         */
        rsnd_mod_bset(mod, SSI_MODE0, (1 << id),
-                     rsnd_scu_hpbif_is_enable(mod) ? 0 : (1 << id));
+                     rsnd_scu_hpbif_is_enable(scu) ? 0 : (1 << id));
 
        /*
         * SSI_MODE1
@@ -316,14 +319,6 @@ static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod,
        return 0;
 }
 
-bool rsnd_scu_hpbif_is_enable(struct rsnd_mod *mod)
-{
-       struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-       u32 flags = rsnd_scu_mode_flags(scu);
-
-       return !!(flags & RSND_SCU_USE_HPBIF);
-}
-
 static int rsnd_scu_init(struct rsnd_mod *mod,
                          struct rsnd_dai *rdai,
                          struct rsnd_dai_stream *io)
@@ -449,7 +444,7 @@ int rsnd_scu_probe(struct platform_device *pdev,
                scu->clk = clk;
 
                ops = &rsnd_scu_non_ops;
-               if (rsnd_scu_hpbif_is_enable(&scu->mod))
+               if (rsnd_scu_hpbif_is_enable(scu))
                        ops = &rsnd_scu_ops;
 
                rsnd_mod_init(priv, &scu->mod, ops, i);