From d1222a0e5f93d2a5d3b3b69699f79f2c62ce1d7c Mon Sep 17 00:00:00 2001 From: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Thu, 11 Apr 2019 19:43:19 +0800 Subject: [PATCH] MLK-21440-4: ASoC: imx-cs42888: remove snd_soc_find_dai Previously we add snd_soc_find_dai to check if the codec is probed or not, but this bring kernel dump issue when CONFIG_LOCKDEP=y. [ 2.823379] WARNING: CPU: 2 PID: 1 at sound/soc/soc-core.c:1016 snd_soc_find_dai+0x144/0x150 [ 2.831827] Modules linked in: [ 2.834907] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.14.78-00007-g524e1b1f0b3f #18 [ 2.842748] Hardware name: FSL i.MX8MM EVK board (DT) [ 2.847811] task: ffff8000624f0000 task.stack: ffff000008078000 [ 2.853745] PC is at snd_soc_find_dai+0x144/0x150 [ 2.858462] LR is at snd_soc_find_dai+0x140/0x150 ... [ 3.469675] Call trace: [ 3.472135] Exception stack(0xffff00000807ba40 to 0xffff00000807bb80) [ 3.478590] ba40: 0000000000000000 00000000ffffffff 0000000000000000 0000000000000002 [ 3.4864333.596564] [<ffff00000883f2a8>] bus_add_driver+0x110/0x230 [ 3.602149] [<ffff0000088412e8>] driver_register+0x68/0x100 [ 3.607735] [<ffff0000088426dc>] __platform_driver_register+0x54/0x60 [ 3.614191] [<ffff0000097e4cc8>] imx_rpmsg_driver_init+0x20/0x28 [ 3.620213] [<ffff0000080844c4>] do_one_initcall+0x44/0x130 [ 3.625801] [<ffff000009760ef8>] kernel_init_freeable+0x1e0/0x280 [ 3.631909] [<ffff00000908c3f8>] kernel_init+0x18/0x110 [ 3.637148] [<ffff000008085a4c>] ret_from_fork+0x10/0x1c So we could't resolve the warning "snd_soc_register_card failed (-517)". Fixes: 2bf5f9704785 ("MLK-19854-1: ASoC: imx-cs42888: fix error when m4 image is not loaded") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit 58ffdf239288cfa6904640fc8432c182cf56589b) --- sound/soc/fsl/imx-cs42888.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sound/soc/fsl/imx-cs42888.c b/sound/soc/fsl/imx-cs42888.c index 8793fa0..5a88426 100644 --- a/sound/soc/fsl/imx-cs42888.c +++ b/sound/soc/fsl/imx-cs42888.c @@ -318,8 +318,6 @@ static int imx_cs42888_probe(struct platform_device *pdev) struct platform_device *esai_pdev; struct platform_device *asrc_pdev = NULL; struct imx_priv *priv = &card_priv; - struct snd_soc_dai_link_component dlc = { 0 }; - struct snd_soc_dai *codec_dai; int ret; u32 width; @@ -388,12 +386,6 @@ static int imx_cs42888_probe(struct platform_device *pdev) if (priv->is_codec_rpmsg) { imx_cs42888_dai[0].codec_name = "rpmsg-audio-codec-cs42888"; imx_cs42888_dai[0].codec_dai_name = "cs42888"; - - dlc.name = "rpmsg-audio-codec-cs42888"; - dlc.dai_name = "cs42888"; - codec_dai = snd_soc_find_dai(&dlc); - if (!codec_dai) - return -ENODEV; } else { imx_cs42888_dai[0].codec_of_node = codec_np; } -- 1.9.1