public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Len Brown <len.brown@intel.com>,
	kyungmin.park@samsung.com, myungjoo.ham@gmail.com,
	linux-pm@lists.linux-foundation.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] Power Hibernate: (bugfix) when failed, "in_suspend" should be reset.
Date: Fri, 26 Nov 2010 23:08:26 +0100	[thread overview]
Message-ID: <201011262308.26332.rjw@sisk.pl> (raw)
In-Reply-To: <1290762713-23616-1-git-send-email-myungjoo.ham@samsung.com>

On Friday, November 26, 2010, MyungJoo Ham wrote:
> When hibernation failed due to an error in swsusp_write() called by
> hibernate(), it skips calling "power_down()" and returns. When
> hibernate() is called again (probably after fixing up so that
> swsusp_write() wouldn't fail again), before "in_suspend = 1" of
> create_image is called, in_suspend should be 0. However, because
> hibernate() did not reset "in_suspend" after a failure, it's already 1.
> 
> This patch fixes such inconsistency of "in_suspend" value.

Applied to suspend-2.6/linux-next.

Thanks,
Rafael


> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  kernel/power/hibernate.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index e6c498d..e27bf22 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -643,6 +643,7 @@ int hibernate(void)
>  		swsusp_free();
>  		if (!error)
>  			power_down();
> +		in_suspend = 0;
>  	} else {
>  		pr_debug("PM: Image restored successfully.\n");
>  	}
> 

  reply	other threads:[~2010-11-26 22:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26  9:11 [PATCH] Power Hibernate: (bugfix) when failed, "in_suspend" should be reset MyungJoo Ham
2010-11-26 22:08 ` Rafael J. Wysocki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-01-02  9:10 Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201011262308.26332.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=kyungmin.park@samsung.com \
    --cc=len.brown@intel.com \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=myungjoo.ham@gmail.com \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox