From: Mark Brown Date: Tue, 31 Jan 2012 15:30:28 +0000 (+0000) Subject: ASoC: core: Support suspend to disk X-Git-Tag: firefly_0821_release~3680^2~2691^2~52^2~25^2~182 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5aa44b132eca1d08f5bb9c5c5cb46eec612db686;p=firefly-linux-kernel-4.4.55.git ASoC: core: Support suspend to disk Use the same pm_ops for all system suspend and resume paths. This isn't ideal for suspend to disk with older CODECs as we'll suspend and then resume the CODEC before powering off all of which takes a long time due to VMID ramps but it's very simple to implement and for modern CODECs the overhead should be minimal. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 35a1e639d7f9..091d5f37ae64 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1663,8 +1663,7 @@ int snd_soc_poweroff(struct device *dev) EXPORT_SYMBOL_GPL(snd_soc_poweroff); const struct dev_pm_ops snd_soc_pm_ops = { - .suspend = snd_soc_suspend, - .resume = snd_soc_resume, + SET_SYSTEM_SLEEP_PM_OPS(snd_soc_suspend, snd_soc_resume) .poweroff = snd_soc_poweroff, }; EXPORT_SYMBOL_GPL(snd_soc_pm_ops);