Skip to content

Commit e0be875

Browse files
wensbroonie
authored andcommitted
ASoc: SOF: topology: Clear SOF link platform name upon unload
The SOF topology loading function sets the device name for the platform component link. This should be unset when unloading the topology, otherwise a machine driver unbind/bind or reprobe would complain about an invalid component as having both its component name and of_node set: mt8186_mt6366 sound: ASoC: Both Component name/of_node are set for AFE_SOF_DL1 mt8186_mt6366 sound: error -EINVAL: Cannot register card mt8186_mt6366 sound: probe with driver mt8186_mt6366 failed with error -22 This happens with machine drivers that set the of_node separately. Clear the SOF link platform name in the topology unload callback. Fixes: 311ce4f ("ASoC: SOF: Add support for loading topologies") Signed-off-by: Chen-Yu Tsai <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 1165e70 commit e0be875

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/soc/sof/topology.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,6 +2050,8 @@ static int sof_link_unload(struct snd_soc_component *scomp, struct snd_soc_dobj
20502050
if (!slink)
20512051
return 0;
20522052

2053+
slink->link->platforms->name = NULL;
2054+
20532055
kfree(slink->tuples);
20542056
list_del(&slink->list);
20552057
kfree(slink->hw_configs);

0 commit comments

Comments
 (0)