[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3316608.URmAE8zNYQ@vostro.rjw.lan>
Date: Sat, 08 Nov 2014 22:52:55 +0100
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Dmitry Eremin-Solenikov <dbaryshkov@...il.com>
Cc: linux-kernel@...r.kernel.org, Len Brown <len.brown@...el.com>,
Pavel Machek <pavel@....cz>, linux-pm@...r.kernel.org
Subject: Re: [PATCH] Fix entering suspend-to-IDLE if no freeze_oops is set
On Saturday, November 08, 2014 07:17:13 PM Dmitry Eremin-Solenikov wrote:
> If no freeze_ops is set, trying to enter suspend-to-IDLE will cause a
> nice oops in platform_suspend_prepare_late(). Add respective checks to
> platform_suspend_prepare_late() and platform_resume_early() functions.
>
> Fixes: a8d46b9e (ACPI / sleep: Rework the handling of ACPI GPE wakeup ...)
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@...il.com>
Applied, thanks!
> ---
> kernel/power/suspend.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
> index 4ca9a33..c347e3c 100644
> --- a/kernel/power/suspend.c
> +++ b/kernel/power/suspend.c
> @@ -146,7 +146,7 @@ static int platform_suspend_prepare(suspend_state_t state)
>
> static int platform_suspend_prepare_late(suspend_state_t state)
> {
> - return state == PM_SUSPEND_FREEZE && freeze_ops->prepare ?
> + return state == PM_SUSPEND_FREEZE && freeze_ops && freeze_ops->prepare ?
> freeze_ops->prepare() : 0;
> }
>
> @@ -164,7 +164,7 @@ static void platform_resume_noirq(suspend_state_t state)
>
> static void platform_resume_early(suspend_state_t state)
> {
> - if (state == PM_SUSPEND_FREEZE && freeze_ops->restore)
> + if (state == PM_SUSPEND_FREEZE && freeze_ops && freeze_ops->restore)
> freeze_ops->restore();
> }
>
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists