[alsa-devel] [PATCH] Revert "ASoC: simple-card-utils: enable "label" on asoc_simple_card_parse_card_name"
This commit breaks existing systems, as snd_soc_of_parse_card_name() doesn't return an error if the DT name property is missing, which would be required to hit the fallback path in the offending commit at all.
Signed-off-by: Lucas Stach l.stach@pengutronix.de --- This should be fixed properly, but given the timing with the 4.13 release being really close, I opted for just reverting the offending commit. --- sound/soc/generic/simple-card-utils.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 7d7ab4aee42e..e6f472360cfc 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -125,21 +125,15 @@ EXPORT_SYMBOL_GPL(asoc_simple_card_set_dailink_name); int asoc_simple_card_parse_card_name(struct snd_soc_card *card, char *prefix) { + char prop[128]; int ret;
- if (!prefix) - prefix = ""; + snprintf(prop, sizeof(prop), "%sname", prefix);
/* Parse the card name from DT */ - ret = snd_soc_of_parse_card_name(card, "label"); - if (ret < 0) { - char prop[128]; - - snprintf(prop, sizeof(prop), "%sname", prefix); - ret = snd_soc_of_parse_card_name(card, prop); - if (ret < 0) - return ret; - } + ret = snd_soc_of_parse_card_name(card, prop); + if (ret < 0) + return ret;
if (!card->name && card->dai_link) card->name = card->dai_link->name;
Hi Lucas
This commit breaks existing systems, as snd_soc_of_parse_card_name() doesn't return an error if the DT name property is missing, which would be required to hit the fallback path in the offending commit at all.
Signed-off-by: Lucas Stach l.stach@pengutronix.de
This should be fixed properly, but given the timing with the 4.13 release being really close, I opted for just reverting the offending commit.
Sorry, but I don't understand your issue, and why it happens. It tries to find "label" -> "[prefix]name" -> error. The difference from previous version (tries "[prefix]name" -> error) is just checking "label". Do you know why it doesn't return error ?
Best regards --- Kuninori Morimoto
Hi Lucas, again
This commit breaks existing systems, as snd_soc_of_parse_card_name() doesn't return an error if the DT name property is missing, which would be required to hit the fallback path in the offending commit at all.
Signed-off-by: Lucas Stach l.stach@pengutronix.de
This should be fixed properly, but given the timing with the 4.13 release being really close, I opted for just reverting the offending commit.
Sorry, but I don't understand your issue, and why it happens. It tries to find "label" -> "[prefix]name" -> error. The difference from previous version (tries "[prefix]name" -> error) is just checking "label". Do you know why it doesn't return error ?
I missed your fixup patch. Sorry for my noise
Best regards --- Kuninori Morimoto
participants (2)
-
Kuninori Morimoto
-
Lucas Stach