]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: qcom: q6apm: remove child devices when apm is removed
authorSrinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Thu, 2 Apr 2026 08:11:07 +0000 (08:11 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 2 Apr 2026 15:33:38 +0000 (16:33 +0100)
looks like q6apm driver does not remove the child driver q6apm-dai and
q6apm-bedais when the this driver is removed.

Fix this by depopulating them in remove callback.

With this change when the dsp is shutdown all the devices associated with
q6apm will now be removed.

Fixes: 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support")
Cc: Stable@vger.kernel.org
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260402081118.348071-3-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/q6apm.c

index 069048db5367118a41012722f6bc2b9d45805eff..2dc525c8be42babc7f1a800ec431b3c21808637b 100644 (file)
@@ -762,6 +762,7 @@ static int apm_probe(gpr_device_t *gdev)
 
 static void apm_remove(gpr_device_t *gdev)
 {
+       of_platform_depopulate(&gdev->dev);
        snd_soc_unregister_component(&gdev->dev);
 }