From b1dd5897f53647390a7622795541bc89f8a84fe2 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Fri, 24 Feb 2012 16:25:49 +0530 Subject: ASoC: core: Don't overwrite .poweroff in snd_soc_pm_ops SET_SYSTEM_SLEEP_PM_OPS writes .poweroff = *_resume once. Then we overwrite it again explicitly as .poweroff = snd_soc_poweroff. Even though it works, as the second one overwrites the first one, this is not the correct way. Fix this by expanding SET_SYSTEM_SLEEP_PM_OPS in our structure. Signed-off-by: Viresh Kumar Signed-off-by: Mark Brown --- sound/soc/soc-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index fc0fd3485e7d..1bdc67e0bd16 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1718,8 +1718,12 @@ int snd_soc_poweroff(struct device *dev) EXPORT_SYMBOL_GPL(snd_soc_poweroff); const struct dev_pm_ops snd_soc_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(snd_soc_suspend, snd_soc_resume) + .suspend = snd_soc_suspend, + .resume = snd_soc_resume, + .freeze = snd_soc_suspend, + .thaw = snd_soc_resume, .poweroff = snd_soc_poweroff, + .restore = snd_soc_resume, }; EXPORT_SYMBOL_GPL(snd_soc_pm_ops); -- cgit v1.2.3