summaryrefslogtreecommitdiffstats
path: root/mm/vmpressure.c
diff options
context:
space:
mode:
authorChancel Liu <chancel.liu@nxp.com>2024-03-04 16:21:28 +0900
committerMark Brown <broonie@kernel.org>2024-03-04 20:27:36 +0000
commit755bb9a44f52dcc386c8db84d7c5a0f94ee95640 (patch)
tree29db71c90d2f3e7cd5110a5c2594e35ef282d92e /mm/vmpressure.c
parent177862317a98adde284233aee074fc6e6a51cf95 (diff)
downloadlinux-stable-755bb9a44f52dcc386c8db84d7c5a0f94ee95640.tar.gz
linux-stable-755bb9a44f52dcc386c8db84d7c5a0f94ee95640.tar.bz2
linux-stable-755bb9a44f52dcc386c8db84d7c5a0f94ee95640.zip
ASoC: soc-core.c: Prefer to return dai->driver->name in snd_soc_dai_name_get()
ASoC machine driver can use snd_soc_{of_}get_dlc() (A) to get DAI name for dlc (snd_soc_dai_link_component). In this function call dlc->dai_name is parsed via snd_soc_dai_name_get() (B). (A) int snd_soc_get_dlc(...) { ... (B) dlc->dai_name = snd_soc_dai_name_get(dai); ... } (B) has a priority to return dai->name as dlc->dai_name. In most cases card can probe successfully. However it has an issue that ASoC tries to rebind card. Here is a simplified flow for example: | a) Card probes successfully at first | b) One of the component bound to this card is removed for some | reason the component->dev is released | c) That component is re-registered v d) ASoC calls snd_soc_try_rebind_card() a) points dlc->dai_name to dai->name. b) releases all resource of the old DAI. c) creates new DAI structure. In result d) can not use dlc->dai_name to add new created DAI. So it's reasonable that prefer to return dai->driver->name in snd_soc_dai_name_get() because dai->driver is a pre-defined global variable. Also update snd_soc_is_matching_dai() for alignment. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://msgid.link/r/20240304072128.2845432-1-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'mm/vmpressure.c')
0 files changed, 0 insertions, 0 deletions