&dai_link->codec_dai_name, \
list_name, cells_name, NULL)
#define asoc_simple_card_parse_platform(node, dai_link, list_name, cells_name) \
- asoc_simple_card_parse_dai(node, NULL, \
+ asoc_simple_card_parse_dai(node, dai_link->platform, \
&dai_link->platform_of_node, \
NULL, list_name, cells_name, NULL)
int asoc_simple_card_parse_dai(struct device_node *node,
int asoc_simple_card_canonicalize_dailink(struct snd_soc_dai_link *dai_link)
{
/* Assumes platform == cpu */
- if (!dai_link->platform_of_node)
- dai_link->platform_of_node = dai_link->cpu_of_node;
-
+ if (dai_link->platform) {
+ if (!dai_link->platform->of_node)
+ dai_link->platform->of_node = dai_link->cpu_of_node;
+ } else {
+ if (!dai_link->platform_of_node)
+ dai_link->platform_of_node = dai_link->cpu_of_node;
+ }
return 0;
+
}
EXPORT_SYMBOL_GPL(asoc_simple_card_canonicalize_dailink);