Message ID | 20210322163728.16616-3-pierre-louis.bossart@linux.intel.com |
---|---|
State | Accepted |
Commit | 91ec48f540f83022377723a774a0a37a630801af |
Headers | show |
Series | ASoC: SOF: Intel: shutdown and core handling corrections | expand |
diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index 495295a34c3a..7005353602c4 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -400,7 +400,13 @@ int snd_sof_device_shutdown(struct device *dev) { struct snd_sof_dev *sdev = dev_get_drvdata(dev); - return snd_sof_shutdown(sdev); + if (IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE)) + cancel_work_sync(&sdev->probe_work); + + if (sdev->fw_state == SOF_FW_BOOT_COMPLETE) + return snd_sof_shutdown(sdev); + + return 0; } EXPORT_SYMBOL(snd_sof_device_shutdown);