diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-08-27 23:08:06 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-08-29 07:51:01 -0400 |
commit | 179949bc04c7157a4b2279f62a842638b61f78f9 (patch) | |
tree | 516c77d47810ca7e4fea0b30e261a4b9e2779b20 /sound/soc | |
parent | 2d82eeb02655e32358efd42598d8276284c23364 (diff) |
ASoC: simple-card: remove dai_link->cpu_dai_name when DT
f687d900d30a61dda38db2a99239f5284a86a309
(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.
6a91a17bd7b92b2d2aa9ece85457f52a62fd7708
(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>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/generic/simple-card.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index c5445b0ae9ff..e8185a0b933f 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c | |||
@@ -285,6 +285,17 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, | |||
285 | dai_props->codec_dai.fmt, | 285 | dai_props->codec_dai.fmt, |
286 | dai_props->codec_dai.sysclk); | 286 | dai_props->codec_dai.sysclk); |
287 | 287 | ||
288 | /* | ||
289 | * soc_bind_dai_link() will check cpu name | ||
290 | * after of_node matching if dai_link has cpu_dai_name. | ||
291 | * but, it will never match if name was created by fmt_single_name() | ||
292 | * remove cpu_dai_name to escape name matching. | ||
293 | * see | ||
294 | * fmt_single_name() | ||
295 | * fmt_multiple_name() | ||
296 | */ | ||
297 | dai_link->cpu_dai_name = NULL; | ||
298 | |||
288 | dai_link_of_err: | 299 | dai_link_of_err: |
289 | if (np) | 300 | if (np) |
290 | of_node_put(np); | 301 | of_node_put(np); |
@@ -429,18 +440,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev) | |||
429 | goto err; | 440 | goto err; |
430 | } | 441 | } |
431 | 442 | ||
432 | /* | ||
433 | * soc_bind_dai_link() will check cpu name | ||
434 | * after of_node matching if dai_link has cpu_dai_name. | ||
435 | * but, it will never match if name was created by fmt_single_name() | ||
436 | * remove cpu_dai_name to escape name matching. | ||
437 | * see | ||
438 | * fmt_single_name() | ||
439 | * fmt_multiple_name() | ||
440 | */ | ||
441 | if (num_links == 1) | ||
442 | dai_link->cpu_dai_name = NULL; | ||
443 | |||
444 | } else { | 443 | } else { |
445 | struct asoc_simple_card_info *cinfo; | 444 | struct asoc_simple_card_info *cinfo; |
446 | 445 | ||