Commit b415b4d3 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 69819f52
...@@ -69,11 +69,10 @@ static u32 rsnd_adg_calculate_rbgx(unsigned long div) ...@@ -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) 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_mod *mod = rsnd_io_to_mod_ssi(io);
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
int id = rsnd_mod_id(mod); int id = rsnd_mod_id(mod);
int ws = id; int ws = id;
if (rsnd_ssi_is_pin_sharing(rsnd_ssi_mod_get(priv, id))) { if (rsnd_ssi_is_pin_sharing(io)) {
switch (id) { switch (id) {
case 1: case 1:
case 2: case 2:
......
...@@ -470,7 +470,7 @@ rsnd_gen2_dma_addr(struct rsnd_dai_stream *io, ...@@ -470,7 +470,7 @@ rsnd_gen2_dma_addr(struct rsnd_dai_stream *io,
dev_err(dev, "DVC is selected without SRC\n"); dev_err(dev, "DVC is selected without SRC\n");
/* use SSIU or SSI ? */ /* use SSIU or SSI ? */
if (is_ssi && rsnd_ssi_use_busif(io, mod)) if (is_ssi && rsnd_ssi_use_busif(io))
is_ssi++; is_ssi++;
return (is_from) ? return (is_from) ?
......
...@@ -572,9 +572,12 @@ int rsnd_ssi_probe(struct platform_device *pdev, ...@@ -572,9 +572,12 @@ int rsnd_ssi_probe(struct platform_device *pdev,
void rsnd_ssi_remove(struct platform_device *pdev, void rsnd_ssi_remove(struct platform_device *pdev,
struct rsnd_priv *priv); struct rsnd_priv *priv);
struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id); 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_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 * R-Car SRC
......
...@@ -159,7 +159,7 @@ int rsnd_src_ssiu_start(struct rsnd_mod *ssi_mod, ...@@ -159,7 +159,7 @@ int rsnd_src_ssiu_start(struct rsnd_mod *ssi_mod,
/* /*
* SSI_MODE1 * SSI_MODE1
*/ */
if (rsnd_ssi_is_pin_sharing(ssi_mod)) { if (rsnd_ssi_is_pin_sharing(io)) {
int shift = -1; int shift = -1;
switch (ssi_id) { switch (ssi_id) {
case 1: case 1:
......
...@@ -86,8 +86,9 @@ struct rsnd_ssi { ...@@ -86,8 +86,9 @@ struct rsnd_ssi {
#define rsnd_ssi_of_node(priv) \ #define rsnd_ssi_of_node(priv) \
of_get_child_by_name(rsnd_priv_to_dev(priv)->of_node, "rcar_sound,ssi") 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); struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
int use_busif = 0; int use_busif = 0;
...@@ -394,7 +395,7 @@ static int rsnd_ssi_start(struct rsnd_mod *mod, ...@@ -394,7 +395,7 @@ static int rsnd_ssi_start(struct rsnd_mod *mod,
{ {
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(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); rsnd_ssi_hw_start(ssi, io);
...@@ -613,7 +614,7 @@ static struct dma_chan *rsnd_ssi_dma_req(struct rsnd_dai_stream *io, ...@@ -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); int is_play = rsnd_io_is_play(io);
char *name; char *name;
if (rsnd_ssi_use_busif(io, mod)) if (rsnd_ssi_use_busif(io))
name = is_play ? "rxu" : "txu"; name = is_play ? "rxu" : "txu";
else else
name = is_play ? "rx" : "tx"; name = is_play ? "rx" : "tx";
...@@ -659,7 +660,7 @@ struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id) ...@@ -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); 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); struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
...@@ -670,7 +671,7 @@ static void rsnd_ssi_parent_setup(struct rsnd_priv *priv, struct rsnd_ssi *ssi) ...@@ -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); struct rsnd_mod *mod = rsnd_mod_get(ssi);
if (!rsnd_ssi_is_pin_sharing(mod)) if (!__rsnd_ssi_is_pin_sharing(mod))
return; return;
switch (rsnd_mod_id(mod)) { switch (rsnd_mod_id(mod)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment