Skip to content

Commit

Permalink
ASoC: simple-card: remove dai_link->cpu_dai_name when DT
Browse files Browse the repository at this point in the history
f687d90
(ASoC: simple-card: cpu_dai_name creates confusion when DT case)
removed dai_link->cpu_dai_name when DT case,
since it uses DT phand in soc_bind_dai_link().
This binding will fail if it has cpu_dai_name.

6a91a17
(ASoC: simple-card: Handle many DAI links)
added multi DAI link support to simple-card driver.
Then, removing cpu_dai_name was cared only single DAI.
But, it is needed in all DT cases.
This patch moves it to asoc_simple_card_dai_link_of()
so that care about all DAIs.

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 Aug 29, 2014
1 parent 2d82eeb commit 179949b
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions sound/soc/generic/simple-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,17 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
dai_props->codec_dai.fmt,
dai_props->codec_dai.sysclk);

/*
* soc_bind_dai_link() will check cpu name
* after of_node matching if dai_link has cpu_dai_name.
* but, it will never match if name was created by fmt_single_name()
* remove cpu_dai_name to escape name matching.
* see
* fmt_single_name()
* fmt_multiple_name()
*/
dai_link->cpu_dai_name = NULL;

dai_link_of_err:
if (np)
of_node_put(np);
Expand Down Expand Up @@ -429,18 +440,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
goto err;
}

/*
* soc_bind_dai_link() will check cpu name
* after of_node matching if dai_link has cpu_dai_name.
* but, it will never match if name was created by fmt_single_name()
* remove cpu_dai_name to escape name matching.
* see
* fmt_single_name()
* fmt_multiple_name()
*/
if (num_links == 1)
dai_link->cpu_dai_name = NULL;

} else {
struct asoc_simple_card_info *cinfo;

Expand Down

0 comments on commit 179949b

Please sign in to comment.