[alsa-devel] [PATCH] ASoC: Intel: add a status for runtime suspend/resume

Mark Brown broonie at kernel.org
Wed Feb 4 21:17:31 CET 2015


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150204/eb28699c/attachment.sig>


More information about the Alsa-devel mailing list