diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-02-24 05:55:49 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-24 09:46:26 -0500 |
commit | b1dd5897f53647390a7622795541bc89f8a84fe2 (patch) | |
tree | 2590c79637a2f949cebaac64f24a2358af3e9d24 /sound | |
parent | 0512615db6dbf5ab7d5b6f46ebbe657707bb9dad (diff) |
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 <viresh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-core.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) | |||
1718 | EXPORT_SYMBOL_GPL(snd_soc_poweroff); | 1718 | EXPORT_SYMBOL_GPL(snd_soc_poweroff); |
1719 | 1719 | ||
1720 | const struct dev_pm_ops snd_soc_pm_ops = { | 1720 | const struct dev_pm_ops snd_soc_pm_ops = { |
1721 | SET_SYSTEM_SLEEP_PM_OPS(snd_soc_suspend, snd_soc_resume) | 1721 | .suspend = snd_soc_suspend, |
1722 | .resume = snd_soc_resume, | ||
1723 | .freeze = snd_soc_suspend, | ||
1724 | .thaw = snd_soc_resume, | ||
1722 | .poweroff = snd_soc_poweroff, | 1725 | .poweroff = snd_soc_poweroff, |
1726 | .restore = snd_soc_resume, | ||
1723 | }; | 1727 | }; |
1724 | EXPORT_SYMBOL_GPL(snd_soc_pm_ops); | 1728 | EXPORT_SYMBOL_GPL(snd_soc_pm_ops); |
1725 | 1729 | ||