Skip to content

Commit

Permalink
ASoC: core: Don't overwrite .poweroff in snd_soc_pm_ops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Viresh Kumar authored and Mark Brown committed Feb 24, 2012
1 parent 0512615 commit b1dd589
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b1dd589

Please sign in to comment.