Re: [PATCH 03/44] hibernate: Call have_kernel_poweroff instead of checking pm_power_off
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Guenter Roeck <linux@xxxxxxxxxxxx>
- Subject: Re: [PATCH 03/44] hibernate: Call have_kernel_poweroff instead of checking pm_power_off
- From: Pavel Machek <pavel@xxxxxx>
- Date: Thu, 9 Oct 2014 12:32:54 +0200
- Cc: linux-kernel@xxxxxxxxxxxxxxx, adi-buildroot-devel@xxxxxxxxxxxxxxxxxxxxx, devel@xxxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, lguest@xxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-am33-list@xxxxxxxxxx, linux-cris-kernel@xxxxxxxx, linux-efi@xxxxxxxxxxxxxxx, linux-hexagon@xxxxxxxxxxxxxxx, linux-m32r-ja@xxxxxxxxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-tegra@xxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, openipmi-developer@xxxxxxxxxxxxxxxxxxxxx, user-mode-linux-devel@xxxxxxxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-c6x-dev@xxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, linux-metag@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>, Len Brown <len.brown@xxxxxxxxx>
- In-reply-to: <1412659726-29957-4-git-send-email-linux@roeck-us.net>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-4-git-send-email-linux@roeck-us.net>
- User-agent: Mutt/1.5.23 (2014-03-12)
On Mon 2014-10-06 22:28:05, Guenter Roeck wrote:
> Poweroff handlers may now be installed with register_poweroff_handler.
> Use the new API function have_kernel_poweroff to determine if a poweroff
> handler has been installed.
>
> Cc: Rafael J. Wysocki <rjw@xxxxxxxxxxxxx>
> Cc: Pavel Machek <pavel@xxxxxx>
> Cc: Len Brown <len.brown@xxxxxxxxx>
> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> ---
> kernel/power/hibernate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index a9dfa79..20353c5 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -602,7 +602,7 @@ static void power_down(void)
> case HIBERNATION_PLATFORM:
> hibernation_platform_enter();
> case HIBERNATION_SHUTDOWN:
> - if (pm_power_off)
> + if (have_kernel_poweroff())
> kernel_power_off();
> break;
poweroff -> power_off.
But if you are playing with this, anyway... does it make sense to
introduce kernel_power_off() that just works, no need to check
have_..?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]