summaryrefslogtreecommitdiff
path: root/sound/soc/generic
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2016-08-25 01:57:30 +0000
committerMark Brown <broonie@kernel.org>2016-09-01 21:21:39 +0100
commit83216f3acc4ab42ffe7001b54cd62f7ca2bde30f (patch)
treec403bb7aa26811c5f4e162ca98f0dccaa1c44a4d /sound/soc/generic
parent112a2ab5a720279d0805018a9ee162e12b0ce463 (diff)
ASoC: simple-scu-card: tidyup asoc_simple_card_parse_links() method
Current asoc_simple_card_parse_links() is setting dai_link daifmt. But, asoc_simple_card_parse_links() is doing it. This patch clean-up this point less method Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic')
-rw-r--r--sound/soc/generic/simple-scu-card.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/generic/simple-scu-card.c b/sound/soc/generic/simple-scu-card.c
index 83add148722f..2f40f9c2927c 100644
--- a/sound/soc/generic/simple-scu-card.c
+++ b/sound/soc/generic/simple-scu-card.c
@@ -110,6 +110,7 @@ static int asoc_simple_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
static int asoc_simple_card_parse_links(struct device_node *np,
struct asoc_simple_card_priv *priv,
+ unsigned int daifmt,
int idx, bool is_fe)
{
struct device *dev = simple_priv_to_dev(priv);
@@ -188,6 +189,7 @@ static int asoc_simple_card_parse_links(struct device_node *np,
if (ret < 0)
return ret;
+ dai_link->dai_fmt = daifmt;
dai_link->dpcm_playback = 1;
dai_link->dpcm_capture = 1;
dai_link->ops = &asoc_simple_card_ops;
@@ -205,7 +207,6 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
struct asoc_simple_card_priv *priv)
{
struct device *dev = simple_priv_to_dev(priv);
- struct snd_soc_dai_link *dai_link;
struct device_node *np;
unsigned int daifmt = 0;
int ret, i;
@@ -223,14 +224,11 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
i = 0;
for_each_child_of_node(node, np) {
- dai_link = simple_priv_to_link(priv, i);
- dai_link->dai_fmt = daifmt;
-
is_fe = false;
if (strcmp(np->name, PREFIX "cpu") == 0)
is_fe = true;
- ret = asoc_simple_card_parse_links(np, priv, i, is_fe);
+ ret = asoc_simple_card_parse_links(np, priv, daifmt, i, is_fe);
if (ret < 0)
return ret;
i++;