From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 09 Oct 2014 12:32:57 +0200 (CEST) Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:47694 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27010918AbaJIKczZe6OY (ORCPT ); Thu, 9 Oct 2014 12:32:55 +0200 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 2109981E51; Thu, 9 Oct 2014 12:32:55 +0200 (CEST) Date: Thu, 9 Oct 2014 12:32:54 +0200 From: Pavel Machek To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, lguest@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-alpha@vger.kernel.org, linux-am33-list@redhat.com, linux-cris-kernel@axis.com, linux-efi@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m32r-ja@ml.linux-m32r.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, linux-xtensa@linux-xtensa.org, openipmi-developer@lists.sourceforge.net, user-mode-linux-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.org, "Rafael J. Wysocki" , Len Brown Subject: Re: [PATCH 03/44] hibernate: Call have_kernel_poweroff instead of checking pm_power_off Message-ID: <20141009103254.GB6787@amd> References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-4-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1412659726-29957-4-git-send-email-linux@roeck-us.net> User-Agent: Mutt/1.5.23 (2014-03-12) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 43121 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: pavel@ucw.cz Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips 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 > Cc: Pavel Machek > Cc: Len Brown > Signed-off-by: Guenter Roeck > --- > 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