ASoC: core: Don't defer probe on optional, NULL components
PATCH 1/1 ASoC: core: Don't defer probe on optional, NULL components
cpu and platform are optional components in DAI links. For example codec-codec links usually have no platform set.
Call snd_soc_find_component only if the name or of_node of a cpu or platform is set. Otherwise it will return NULL and soc_init_dai_link bails out immediately with -EPROBE_DEFER, meaning registering a card with NULL cpu or platform in DAI links can never succeed.
--- sound/soc/soc-core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/soc-core.c +4 -2
@@ -1135,7 +1135,8 @@ static int soc_init_dai_link(struct snd_soc_card *card,* Defer card registartion if platform dai component is not added to * component list. */ -if (!soc_find_component (link->platform->of_node, link->platform->name)) +if ((link->platform->of_node || link->platform->name) && + !soc_find_component (link->platform->of_node, link->platform->name))return -EPROBE_DEFER ;/*
@@ -1154,7 +1155,8 @@ static int soc_init_dai_link(struct snd_soc_card *card,* Defer card registartion if cpu dai component is not added to * component list. */ -if (!soc_find_component (link->cpu_of_node, link->cpu_name)) +if ((link->cpu_of_node || link->cpu_name) && + !soc_find_component (link->cpu_of_node, link->cpu_name))return -EPROBE_DEFER ;/*
Signature · 1 line
2.19.2
Mark Brown
maintainerApplied "ASoC: core: Don't defer probe on optional, NULL components" to the asoc tree
The patch
ASoC: core: Don't defer probe on optional, NULL components
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
2833548ecbb385a289124077ab4d812258a867d5Mon Sep 17 00:00:00 2001
From: Matthias Reichl <[email protected]>
Date: Tue, 15 Jan 2019 17:51:07 +0100
Subject: [PATCH] ASoC: core: Don't defer probe on optional, NULL components
cpu and platform are optional components in DAI links. For example codec-codec links usually have no platform set.
Call snd_soc_find_component only if the name or of_node of a cpu or platform is set. Otherwise it will return NULL and soc_init_dai_link bails out immediately with -EPROBE_DEFER, meaning registering a card with NULL cpu or platform in DAI links can never succeed.
--- sound/soc/soc-core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/soc-core.c +4 -2
@@ -1135,7 +1135,8 @@ static int soc_init_dai_link(struct snd_soc_card *card,* Defer card registartion if platform dai component is not added to * component list. */ -if (!soc_find_component (link->platform->of_node, link->platform->name)) +if ((link->platform->of_node || link->platform->name) && + !soc_find_component (link->platform->of_node, link->platform->name))return -EPROBE_DEFER ;/*
@@ -1154,7 +1155,8 @@ static int soc_init_dai_link(struct snd_soc_card *card,* Defer card registartion if cpu dai component is not added to * component list. */ -if (!soc_find_component (link->cpu_of_node, link->cpu_name)) +if ((link->cpu_of_node || link->cpu_name) && + !soc_find_component (link->cpu_of_node, link->cpu_name))return -EPROBE_DEFER ;/*
Signature · 1 line
2.20.1