4 Feb
2015
4 Feb
'15
9:17 p.m.
On Wed, Feb 04, 2015 at 09:42:14PM +0800, Jie Yang wrote:
- else if (pdata->pm_state == HSW_PM_STATE_RTD3)
goto suspend;
sst_hsw_dsp_runtime_sleep(hsw);
+suspend:
- snd_soc_suspend(pdata->soc_card->dev);
- snd_soc_poweroff(pdata->soc_card->dev);
- pdata->pm_state = HSW_PM_STATE_D3;
This is a pretty big jump for goto and it's not the usual goto as error handling idiom either; it seems better to refactor the code so that this isn't required. For example have a runtime PM function which is also called by the system suspend path.