]> git.baikalelectronics.ru Git - kernel.git/commit
Suspend: Introduce begin() and end() callbacks
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 7 Jan 2008 23:04:17 +0000 (00:04 +0100)
committerLen Brown <len.brown@intel.com>
Fri, 1 Feb 2008 23:30:56 +0000 (18:30 -0500)
commitc2d0b2094258b8914c344e06f314296e46bcdbd0
tree36b0cb4e667792212c2b5d05ac212662555d1682
parentc03698435d497a4f0d0fdbbbda26aac3277333bc
Suspend: Introduce begin() and end() callbacks

On ACPI systems the target state set by acpi_pm_set_target() is
reset by acpi_pm_finish(), but that need not be called if the
suspend fails.  All platforms that use the .set_target() global
suspend callback are affected by analogous issues.

For this reason, we need an additional global suspend callback that
will reset the target state regardless of whether or not the suspend
is successful.  Also, it is reasonable to rename the .set_target()
callback, since it will be used for a different purpose on ACPI
systems (due to ACPI 1.0x code ordering requirements).

Introduce the global suspend callback .end() to be executed at the
end of the suspend sequence and rename the .set_target() global
suspend callback to .begin().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
arch/arm/mach-at91/pm.c
arch/powerpc/platforms/52xx/lite5200_pm.c
drivers/acpi/sleep/main.c
include/linux/suspend.h
kernel/power/main.c