ASoC: SOF: pm: Remove duplicated code in sof_suspend
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fri, 16 Jun 2023 10:00:38 +0000 (12:00 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 16 Jun 2023 11:53:53 +0000 (12:53 +0100)
commit399961423314680c6cb14ac822600b9ede2b991f
tree3914fcdbecb3809459f76bc2b92c9245e2077d7b
parentc3d275e3a84833368c47c803043105bda095a624
ASoC: SOF: pm: Remove duplicated code in sof_suspend

Over time the function has changed and now there is no need to have the
duplicated sof_fw_trace_suspend() and sof_suspend_clients() in the
if (target_state == SOF_DSP_PM_D0) branch.

Remove it and add a simple check with a single goto statement.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Paul Olaru <olarupaulstelian97@gmail.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230616100039.378150-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pm.c