diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c index 534c8795e7e85d..e7a067d61a64fe 100644 --- a/drivers/soundwire/intel_init.c +++ b/drivers/soundwire/intel_init.c @@ -117,6 +117,7 @@ static void intel_link_dev_unregister(struct sdw_intel_link_dev *ldev) static int sdw_intel_cleanup(struct sdw_intel_ctx *ctx) { struct sdw_intel_link_dev *ldev; + struct sdw_slave *slave; u32 link_mask; int i; @@ -132,6 +133,13 @@ static int sdw_intel_cleanup(struct sdw_intel_ctx *ctx) if (!ldev->link_res.clock_stop_quirks) pm_runtime_put_noidle(ldev->link_res.dev); + /* + * Disable runtime PM to prevent peripherals from being resume in the + * link device unregistering process. + */ + list_for_each_entry(slave, &ldev->link_res.cdns->bus.slaves, node) + pm_runtime_disable(&slave->dev); + intel_link_dev_unregister(ldev); } diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 66126fb31d52db..eb1b90c55f0a35 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -220,12 +220,11 @@ static int hda_sdw_exit(struct snd_sof_dev *sdev) hdev = sdev->pdata->hw_pdata; - hda_sdw_int_enable(sdev, false); - if (hdev->sdw) sdw_intel_exit(hdev->sdw); hdev->sdw = NULL; + hda_sdw_int_enable(sdev, false); return 0; }