Skip to content

Commit

Permalink
ASoC: rsnd: remove rsnd_priv_read/write/bset()
Browse files Browse the repository at this point in the history
adg.c only used rsnd_priv_read/write/bset()
which is the only user of NULL mod.
but, it can be removed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Sep 24, 2013
1 parent ef85b64 commit efeb970
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 7 additions & 3 deletions sound/soc/sh/rcar/adg.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ struct rsnd_adg {

int rate_of_441khz_div_6;
int rate_of_48khz_div_6;
u32 ckr;
};

#define for_each_rsnd_clk(pos, adg, i) \
Expand Down Expand Up @@ -115,6 +116,11 @@ int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate)

found_clock:

/* see rsnd_adg_ssi_clk_init() */
rsnd_mod_bset(mod, SSICKR, 0x00FF0000, adg->ckr);
rsnd_mod_write(mod, BRRA, 0x00000002); /* 1/6 */
rsnd_mod_write(mod, BRRB, 0x00000002); /* 1/6 */

/*
* This "mod" = "ssi" here.
* we can get "ssi id" from mod
Expand Down Expand Up @@ -181,9 +187,7 @@ static void rsnd_adg_ssi_clk_init(struct rsnd_priv *priv, struct rsnd_adg *adg)
}
}

rsnd_priv_bset(priv, SSICKR, 0x00FF0000, ckr);
rsnd_priv_write(priv, BRRA, 0x00000002); /* 1/6 */
rsnd_priv_write(priv, BRRB, 0x00000002); /* 1/6 */
adg->ckr = ckr;
}

int rsnd_adg_probe(struct platform_device *pdev,
Expand Down
4 changes: 0 additions & 4 deletions sound/soc/sh/rcar/rsnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ struct rsnd_dai_stream;
#define rsnd_mod_bset(m, r, s, d) \
rsnd_bset(rsnd_mod_to_priv(m), m, RSND_REG_##r, s, d)

#define rsnd_priv_read(p, r) rsnd_read(p, NULL, RSND_REG_##r)
#define rsnd_priv_write(p, r, d) rsnd_write(p, NULL, RSND_REG_##r, d)
#define rsnd_priv_bset(p, r, s, d) rsnd_bset(p, NULL, RSND_REG_##r, s, d)

u32 rsnd_read(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg);
void rsnd_write(struct rsnd_priv *priv, struct rsnd_mod *mod,
enum rsnd_reg reg, u32 data);
Expand Down

0 comments on commit efeb970

Please sign in to comment.