ASoC: rsnd: rsnd_scu_hpbif_is_enable() become macro

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>
This commit is contained in:
Kuninori Morimoto 2014-01-23 18:40:54 -08:00 коммит произвёл Mark Brown
Родитель 39cf3c4064
Коммит 96c7c0d6f8
2 изменённых файлов: 5 добавлений и 11 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -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);