PM / hibernate: no kernel_power_off when pm_power_off NULL
authorSebastian Capella <sebastian.capella@linaro.org>
Tue, 22 Apr 2014 00:30:46 +0000 (17:30 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 30 Apr 2014 23:02:25 +0000 (01:02 +0200)
commit2c730785d9532d2a9c46e059bd6a6c9a764c539f
treedb321b3e87c9ebaf4897a8a8e8fed9f79195a6ea
parent4881f603d7b82df2bc15efd2a272f973a3bf8df1
PM / hibernate: no kernel_power_off when pm_power_off NULL

Reboot logic in kernel/reboot will avoid calling kernel_power_off
when pm_power_off is null, and instead uses kernel_halt.  Change
hibernate's power_down to follow the behavior in the reboot call.

Calling the notifier twice (once for SYS_POWER_OFF and again for
SYS_HALT) causes a panic during hibernation on Kirkwood
Openblocks A6 board.

Signed-off-by: Sebastian Capella <sebastian.capella@linaro.org>
Reported-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/hibernate.c