lkml.org 
[lkml]   [2014]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v7 2/2] ARM hibernation / suspend-to-disk
From
On 19 March 2014 13:47, Sebastian Capella <sebastian.capella@linaro.org> wrote:
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index a5f702a..d96b910 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -594,7 +594,8 @@ static void power_down(void)
> case HIBERNATION_PLATFORM:
> hibernation_platform_enter();
> case HIBERNATION_SHUTDOWN:
> - kernel_power_off();
> + if (pm_power_off)
> + kernel_power_off();
> break;
> #ifdef CONFIG_SUSPEND
> case HIBERNATION_SUSPEND:
>
>
> This follows the behavior in the reboot syscall which does it this way
> also. I'm testing this now, and it seems work fine. If this looks
> good, I can add it as an additional patch.

BTW, one thing I would point out is that kernel_power_off and
kernel_halt call the same notifier but with different parameters
(SYS_POWER_OFF and SYS_HALT).

If pm_power_down is null, I dont see why we'd want to notify
SYS_POWER_OFF before SYS_HALT. With the previous change I'm assuming
there's no benefit, so please chime in if you know a reason.

Thanks,

Sebastian


\
 
 \ /
  Last update: 2014-03-19 22:41    [W:0.082 / U:16.868 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site