From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
pm list <linux-pm@lists.linux-foundation.org>,
Alexey Starikovskiy <aystarik@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>
Subject: [RFC][PATCH 1/4] swsusp: Remove incorrect code from user.c
Date: Fri, 18 May 2007 00:21:21 +0200 [thread overview]
Message-ID: <200705180021.21953.rjw@sisk.pl> (raw)
In-Reply-To: <200705180019.35548.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
Make the code hibernation code in kernel/power/user.c be functionally equivalent
to the corresponding code in kernel/power/disk.c , as it should be.
The calls to the platform functions removed by this patch are incorrect. They
should be replaced with some other "platform" operations that will be
introduced in one of the subsequent patches.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/user.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
Index: linux-2.6.21/kernel/power/user.c
===================================================================
--- linux-2.6.21.orig/kernel/power/user.c 2007-05-08 22:10:36.000000000 +0200
+++ linux-2.6.21/kernel/power/user.c 2007-05-08 23:03:17.000000000 +0200
@@ -179,34 +179,25 @@ static inline int snapshot_suspend(int p
return error;
}
-static inline int snapshot_restore(int platform_suspend)
+static inline int snapshot_restore(void)
{
int error;
mutex_lock(&pm_mutex);
pm_prepare_console();
- if (platform_suspend) {
- error = platform_prepare();
- if (error)
- goto Finish;
- }
suspend_console();
error = device_suspend(PMSG_PRETHAW);
if (error)
- goto Resume_devices;
+ goto Finish;
error = disable_nonboot_cpus();
if (!error)
error = swsusp_resume();
enable_nonboot_cpus();
- Resume_devices:
- if (platform_suspend)
- platform_finish();
-
+ Finish:
device_resume();
resume_console();
- Finish:
pm_restore_console();
mutex_unlock(&pm_mutex);
return error;
@@ -272,7 +263,7 @@ static int snapshot_ioctl(struct inode *
error = -EPERM;
break;
}
- error = snapshot_restore(data->platform_suspend);
+ error = snapshot_restore();
break;
case SNAPSHOT_FREE:
next prev parent reply other threads:[~2007-05-17 22:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 22:19 [RFC][PATCH 0/4] swsusp: Fix hibernation/restore code ordering Rafael J. Wysocki
2007-05-17 22:21 ` Rafael J. Wysocki [this message]
2007-05-21 23:29 ` [RFC][PATCH 1/4] swsusp: Remove incorrect code from user.c Pavel Machek
2007-05-17 22:22 ` [RFC][PATCH 2/4] swsusp: Remove code duplication between disk.c and user.c Rafael J. Wysocki
2007-05-21 23:30 ` Pavel Machek
2007-05-17 22:24 ` [RFC][PATCH 3/4] swsusp: Introduce restore platform operations Rafael J. Wysocki
2007-05-21 23:38 ` Pavel Machek
2007-05-21 23:55 ` Rafael J. Wysocki
2007-05-22 20:03 ` Rafael J. Wysocki
2007-05-22 20:10 ` Alexey Starikovskiy
2007-05-22 20:30 ` Rafael J. Wysocki
2007-05-17 22:26 ` [RFC][PATCH 4/4] swsusp: Fix hibernation code ordering Rafael J. Wysocki
2007-05-19 8:36 ` [RFC][PATCH 4/4] swsusp: Fix hibernation code ordering (updated) Rafael J. Wysocki
2007-05-21 23:31 ` 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=200705180021.21953.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=aystarik@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
/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