]> git.baikalelectronics.ru Git - kernel.git/commit
PM / sleep: Return -EBUSY from suspend_enter() on wakeup detection
authorRuchi Kandoi <kandoiruchi@google.com>
Fri, 8 May 2015 02:07:42 +0000 (19:07 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 May 2015 00:26:56 +0000 (02:26 +0200)
commitfcfada18459928ed28ca3d871a6c86bd00d2bc36
treeb6034c7606da0728504e449353f46ec74bdfac54
parent2ac2ebf33301a4601f0d481c56e7f27a25491164
PM / sleep: Return -EBUSY from suspend_enter() on wakeup detection

If a wakeup source is found to be pending in the last stage of
suspend after syscore suspend, then the machine won't suspend, but
suspend_enter() will return 0.  That is confusing, as wakeup detection
elsewhere causes -EBUSY to be returned from suspend_enter().

To avoid the confusion, make suspend_enter() return -EBUSY in that
case too.

Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
[ rjw: Subject and changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/suspend.c