linux/kernel/power
Rafael J. Wysocki 127067a9c9 swsusp: remove incorrect code from user.c
In the face of the recent change of suspend code ordering (cf.
http://marc.info/?l=linux-acpi&m=117938245931603&w=2) we should also modify
the code ordering in swsusp so that hibernation_ops->prepare() is executed
after device_suspend().

However, for this purpose it seems reasonable to eliminate the code
duplication between kernel/power/disk.c and kernel/power/user.c first.  By
eliminating it we can reduce the size of user.c quite substantially and remove
the maintenance difficulty with making essentially the same changes in two
different places.

Moreover, we should also remove the calls to "platform" functions from the
restore code path, since it doesn't carry out any power transition of the
system, but we generally need to disable the GPEs before the restore if the
'platform' hibernation mode has been used.  To do this, we can introduce two
new hibernation_ops to be used in the restore code.

This patch:

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" invocations that will be
introduced in one of the subsequent patches.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19 10:04:42 -07:00
..
Kconfig PM: Do not require dev spew to get PM_DEBUG 2007-07-19 10:04:42 -07:00
Makefile [PATCH] Disable CPU hotplug during suspend 2006-09-26 08:48:59 -07:00
console.c [PATCH] swsusp: fix suspend when console is in VT_AUTO+KD_GRAPHICS mode 2007-03-16 19:25:05 -07:00
disk.c swsusp: fix sysfs interface 2007-05-17 05:23:05 -07:00
main.c PM: introduce set_target method in pm_ops 2007-07-01 12:29:44 -07:00
pm.c [PATCH] remove kernel/power/pm.c:pm_unregister_all() 2006-07-12 16:09:08 -07:00
power.h PM: Separate hibernation code from suspend code 2007-05-09 12:30:48 -07:00
poweroff.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
process.c freezer: run show_state() when freezing times out 2007-07-19 10:04:42 -07:00
snapshot.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-05-09 12:56:01 -07:00
swap.c power: Fix sizeof(PAGE_SIZE) typo 2007-05-23 20:14:14 -07:00
swsusp.c swsusp: free more memory 2007-05-07 12:12:59 -07:00
user.c swsusp: remove incorrect code from user.c 2007-07-19 10:04:42 -07:00