Skip to content

Commit b74f81f

Browse files
ranj063plbossart
authored andcommitted
ASoC: SOF: simplify snd_sof_device_remove()
The commit "ASoC: SOF: core: Unregister machine driver before IPC and debugfs" moved the call to unregister the machine driver to be done before freeing the IPC. With this change, we can safely move the call to snd_sof_remove() inside the same if() block just above. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent 7cc5f8a commit b74f81f

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

sound/soc/sof/core.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -442,16 +442,8 @@ int snd_sof_device_remove(struct device *dev)
442442

443443
snd_sof_ipc_free(sdev);
444444
snd_sof_free_debug(sdev);
445-
}
446-
447-
/*
448-
* Unregistering the machine driver results in unloading the topology.
449-
* Some widgets, ex: scheduler, attempt to power down the core they are
450-
* scheduled on, when they are unloaded. Therefore, the DSP must be
451-
* removed only after the topology has been unloaded.
452-
*/
453-
if (sdev->fw_state > SOF_FW_BOOT_NOT_STARTED)
454445
snd_sof_remove(sdev);
446+
}
455447

456448
/* release firmware */
457449
snd_sof_fw_unload(sdev);

0 commit comments

Comments
 (0)