Skip to content

Commit

Permalink
ASoC: rsnd: remove duplicate parameter from rsnd_ssi_xxx()
Browse files Browse the repository at this point in the history
rsnd_ssi_use_busif() and rsnd_ssi_is_pin_sharing() are the function
which returns current SSI status. But these requests duplicated parameter.
This patch removes duplicated parameter.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Oct 22, 2015
1 parent 69819f5 commit b415b4d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
3 changes: 1 addition & 2 deletions sound/soc/sh/rcar/adg.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ static u32 rsnd_adg_calculate_rbgx(unsigned long div)
static u32 rsnd_adg_ssi_ws_timing_gen2(struct rsnd_dai_stream *io)
{
struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io);
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
int id = rsnd_mod_id(mod);
int ws = id;

if (rsnd_ssi_is_pin_sharing(rsnd_ssi_mod_get(priv, id))) {
if (rsnd_ssi_is_pin_sharing(io)) {
switch (id) {
case 1:
case 2:
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sh/rcar/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ rsnd_gen2_dma_addr(struct rsnd_dai_stream *io,
dev_err(dev, "DVC is selected without SRC\n");

/* use SSIU or SSI ? */
if (is_ssi && rsnd_ssi_use_busif(io, mod))
if (is_ssi && rsnd_ssi_use_busif(io))
is_ssi++;

return (is_from) ?
Expand Down
7 changes: 5 additions & 2 deletions sound/soc/sh/rcar/rsnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,12 @@ int rsnd_ssi_probe(struct platform_device *pdev,
void rsnd_ssi_remove(struct platform_device *pdev,
struct rsnd_priv *priv);
struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id);
int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);
int rsnd_ssi_is_dma_mode(struct rsnd_mod *mod);
int rsnd_ssi_use_busif(struct rsnd_dai_stream *io, struct rsnd_mod *mod);
int rsnd_ssi_use_busif(struct rsnd_dai_stream *io);

#define rsnd_ssi_is_pin_sharing(io) \
__rsnd_ssi_is_pin_sharing(rsnd_io_to_mod_ssi(io))
int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);

/*
* R-Car SRC
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sh/rcar/src.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ int rsnd_src_ssiu_start(struct rsnd_mod *ssi_mod,
/*
* SSI_MODE1
*/
if (rsnd_ssi_is_pin_sharing(ssi_mod)) {
if (rsnd_ssi_is_pin_sharing(io)) {
int shift = -1;
switch (ssi_id) {
case 1:
Expand Down
11 changes: 6 additions & 5 deletions sound/soc/sh/rcar/ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ struct rsnd_ssi {
#define rsnd_ssi_of_node(priv) \
of_get_child_by_name(rsnd_priv_to_dev(priv)->of_node, "rcar_sound,ssi")

int rsnd_ssi_use_busif(struct rsnd_dai_stream *io, struct rsnd_mod *mod)
int rsnd_ssi_use_busif(struct rsnd_dai_stream *io)
{
struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io);
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
int use_busif = 0;

Expand Down Expand Up @@ -394,7 +395,7 @@ static int rsnd_ssi_start(struct rsnd_mod *mod,
{
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);

rsnd_src_ssiu_start(mod, io, rsnd_ssi_use_busif(io, mod));
rsnd_src_ssiu_start(mod, io, rsnd_ssi_use_busif(io));

rsnd_ssi_hw_start(ssi, io);

Expand Down Expand Up @@ -613,7 +614,7 @@ static struct dma_chan *rsnd_ssi_dma_req(struct rsnd_dai_stream *io,
int is_play = rsnd_io_is_play(io);
char *name;

if (rsnd_ssi_use_busif(io, mod))
if (rsnd_ssi_use_busif(io))
name = is_play ? "rxu" : "txu";
else
name = is_play ? "rx" : "tx";
Expand Down Expand Up @@ -659,7 +660,7 @@ struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id)
return rsnd_mod_get((struct rsnd_ssi *)(priv->ssi) + id);
}

int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)
int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)
{
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);

Expand All @@ -670,7 +671,7 @@ static void rsnd_ssi_parent_setup(struct rsnd_priv *priv, struct rsnd_ssi *ssi)
{
struct rsnd_mod *mod = rsnd_mod_get(ssi);

if (!rsnd_ssi_is_pin_sharing(mod))
if (!__rsnd_ssi_is_pin_sharing(mod))
return;

switch (rsnd_mod_id(mod)) {
Expand Down

0 comments on commit b415b4d

Please sign in to comment.