diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-10-21 23:15:46 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-10-22 08:30:01 -0400 |
commit | b415b4d3122a466f3a73d86a1dd2dcdc13de7ef3 (patch) | |
tree | 952541672fa24ba8f9ae0238a4d7879ed8388366 | |
parent | 69819f527afba7a909a2aba32521a3bea8e3b60b (diff) |
ASoC: rsnd: remove duplicate parameter from rsnd_ssi_xxx()
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>
-rw-r--r-- | sound/soc/sh/rcar/adg.c | 3 | ||||
-rw-r--r-- | sound/soc/sh/rcar/dma.c | 2 | ||||
-rw-r--r-- | sound/soc/sh/rcar/rsnd.h | 7 | ||||
-rw-r--r-- | sound/soc/sh/rcar/src.c | 2 | ||||
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 11 |
5 files changed, 14 insertions, 11 deletions
diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c index c4ebbb7a7b6f..2a5b3a293cd2 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c | |||
@@ -69,11 +69,10 @@ static u32 rsnd_adg_calculate_rbgx(unsigned long div) | |||
69 | static u32 rsnd_adg_ssi_ws_timing_gen2(struct rsnd_dai_stream *io) | 69 | static u32 rsnd_adg_ssi_ws_timing_gen2(struct rsnd_dai_stream *io) |
70 | { | 70 | { |
71 | struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); | 71 | struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); |
72 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); | ||
73 | int id = rsnd_mod_id(mod); | 72 | int id = rsnd_mod_id(mod); |
74 | int ws = id; | 73 | int ws = id; |
75 | 74 | ||
76 | if (rsnd_ssi_is_pin_sharing(rsnd_ssi_mod_get(priv, id))) { | 75 | if (rsnd_ssi_is_pin_sharing(io)) { |
77 | switch (id) { | 76 | switch (id) { |
78 | case 1: | 77 | case 1: |
79 | case 2: | 78 | case 2: |
diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c index bfbb8a5e93bd..5d084d040961 100644 --- a/sound/soc/sh/rcar/dma.c +++ b/sound/soc/sh/rcar/dma.c | |||
@@ -470,7 +470,7 @@ rsnd_gen2_dma_addr(struct rsnd_dai_stream *io, | |||
470 | dev_err(dev, "DVC is selected without SRC\n"); | 470 | dev_err(dev, "DVC is selected without SRC\n"); |
471 | 471 | ||
472 | /* use SSIU or SSI ? */ | 472 | /* use SSIU or SSI ? */ |
473 | if (is_ssi && rsnd_ssi_use_busif(io, mod)) | 473 | if (is_ssi && rsnd_ssi_use_busif(io)) |
474 | is_ssi++; | 474 | is_ssi++; |
475 | 475 | ||
476 | return (is_from) ? | 476 | return (is_from) ? |
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 38c16d7cd2e8..085329878525 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h | |||
@@ -572,9 +572,12 @@ int rsnd_ssi_probe(struct platform_device *pdev, | |||
572 | void rsnd_ssi_remove(struct platform_device *pdev, | 572 | void rsnd_ssi_remove(struct platform_device *pdev, |
573 | struct rsnd_priv *priv); | 573 | struct rsnd_priv *priv); |
574 | struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id); | 574 | struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id); |
575 | int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod); | ||
576 | int rsnd_ssi_is_dma_mode(struct rsnd_mod *mod); | 575 | int rsnd_ssi_is_dma_mode(struct rsnd_mod *mod); |
577 | int rsnd_ssi_use_busif(struct rsnd_dai_stream *io, struct rsnd_mod *mod); | 576 | int rsnd_ssi_use_busif(struct rsnd_dai_stream *io); |
577 | |||
578 | #define rsnd_ssi_is_pin_sharing(io) \ | ||
579 | __rsnd_ssi_is_pin_sharing(rsnd_io_to_mod_ssi(io)) | ||
580 | int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod); | ||
578 | 581 | ||
579 | /* | 582 | /* |
580 | * R-Car SRC | 583 | * R-Car SRC |
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 37d41f06b3d0..261b50217c48 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c | |||
@@ -159,7 +159,7 @@ int rsnd_src_ssiu_start(struct rsnd_mod *ssi_mod, | |||
159 | /* | 159 | /* |
160 | * SSI_MODE1 | 160 | * SSI_MODE1 |
161 | */ | 161 | */ |
162 | if (rsnd_ssi_is_pin_sharing(ssi_mod)) { | 162 | if (rsnd_ssi_is_pin_sharing(io)) { |
163 | int shift = -1; | 163 | int shift = -1; |
164 | switch (ssi_id) { | 164 | switch (ssi_id) { |
165 | case 1: | 165 | case 1: |
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index e550621d0ca7..1427ec21bd7e 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c | |||
@@ -86,8 +86,9 @@ struct rsnd_ssi { | |||
86 | #define rsnd_ssi_of_node(priv) \ | 86 | #define rsnd_ssi_of_node(priv) \ |
87 | of_get_child_by_name(rsnd_priv_to_dev(priv)->of_node, "rcar_sound,ssi") | 87 | of_get_child_by_name(rsnd_priv_to_dev(priv)->of_node, "rcar_sound,ssi") |
88 | 88 | ||
89 | int rsnd_ssi_use_busif(struct rsnd_dai_stream *io, struct rsnd_mod *mod) | 89 | int rsnd_ssi_use_busif(struct rsnd_dai_stream *io) |
90 | { | 90 | { |
91 | struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); | ||
91 | struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); | 92 | struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); |
92 | int use_busif = 0; | 93 | int use_busif = 0; |
93 | 94 | ||
@@ -394,7 +395,7 @@ static int rsnd_ssi_start(struct rsnd_mod *mod, | |||
394 | { | 395 | { |
395 | struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); | 396 | struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); |
396 | 397 | ||
397 | rsnd_src_ssiu_start(mod, io, rsnd_ssi_use_busif(io, mod)); | 398 | rsnd_src_ssiu_start(mod, io, rsnd_ssi_use_busif(io)); |
398 | 399 | ||
399 | rsnd_ssi_hw_start(ssi, io); | 400 | rsnd_ssi_hw_start(ssi, io); |
400 | 401 | ||
@@ -613,7 +614,7 @@ static struct dma_chan *rsnd_ssi_dma_req(struct rsnd_dai_stream *io, | |||
613 | int is_play = rsnd_io_is_play(io); | 614 | int is_play = rsnd_io_is_play(io); |
614 | char *name; | 615 | char *name; |
615 | 616 | ||
616 | if (rsnd_ssi_use_busif(io, mod)) | 617 | if (rsnd_ssi_use_busif(io)) |
617 | name = is_play ? "rxu" : "txu"; | 618 | name = is_play ? "rxu" : "txu"; |
618 | else | 619 | else |
619 | name = is_play ? "rx" : "tx"; | 620 | name = is_play ? "rx" : "tx"; |
@@ -659,7 +660,7 @@ struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id) | |||
659 | return rsnd_mod_get((struct rsnd_ssi *)(priv->ssi) + id); | 660 | return rsnd_mod_get((struct rsnd_ssi *)(priv->ssi) + id); |
660 | } | 661 | } |
661 | 662 | ||
662 | int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod) | 663 | int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod) |
663 | { | 664 | { |
664 | struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); | 665 | struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); |
665 | 666 | ||
@@ -670,7 +671,7 @@ static void rsnd_ssi_parent_setup(struct rsnd_priv *priv, struct rsnd_ssi *ssi) | |||
670 | { | 671 | { |
671 | struct rsnd_mod *mod = rsnd_mod_get(ssi); | 672 | struct rsnd_mod *mod = rsnd_mod_get(ssi); |
672 | 673 | ||
673 | if (!rsnd_ssi_is_pin_sharing(mod)) | 674 | if (!__rsnd_ssi_is_pin_sharing(mod)) |
674 | return; | 675 | return; |
675 | 676 | ||
676 | switch (rsnd_mod_id(mod)) { | 677 | switch (rsnd_mod_id(mod)) { |