diff mbox series

[SRU,H/OEM-5.10,v2,2/6] ASoC: SOF: add snd_sof_device_shutdown() helper for shutdown

Message ID 20210318043918.9900-3-hui.wang@canonical.com
State New
Headers show
Series power off stress test will hang on the TGL machines | expand

Commit Message

Hui Wang March 18, 2021, 4:39 a.m. UTC
From: Keyon Jie <yang.jie@linux.intel.com>

BugLink: https://bugs.launchpad.net/bugs/1919930

Add helper snd_sof_device_shutdown() to wrap the platform specific
.shutdown callbacks for SOF platforms.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210113152617.4048541-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit daff7f1478e12cdee3e639c83c571cfd38bc5080)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
 sound/soc/sof/core.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series


diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index adc7c37145d6..8532742b0519 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -384,6 +384,14 @@  int snd_sof_device_remove(struct device *dev)
+int snd_sof_device_shutdown(struct device *dev)
+	struct snd_sof_dev *sdev = dev_get_drvdata(dev);
+	return snd_sof_shutdown(sdev);
 MODULE_AUTHOR("Liam Girdwood");
 MODULE_DESCRIPTION("Sound Open Firmware (SOF) Core");