linux/kernel/power
Marcos Paulo de Souza 8916e3702e PM / Suspend: Avoid code duplication in suspend statistics update
The code
       if (error) {
               suspend_stats.fail++;
               dpm_save_failed_errno(error);
       } else
               suspend_stats.success++;

Appears in the kernel/power/main.c and kernel/power/suspend.c.

This patch just creates a new function to avoid duplicated code.

Suggested-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-02-09 23:55:43 +01:00
..
block_io.c block: kill off REQ_UNPLUG 2011-03-10 08:52:27 +01:00
console.c PM / VT: Cleanup #if defined uglyness and fix compile error 2011-10-16 23:28:51 +02:00
hibernate.c PM / Sleep: Introduce "late suspend" and "early resume" of devices 2012-01-29 20:38:29 +01:00
Kconfig Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2011-10-28 12:02:27 -07:00
main.c PM / Suspend: Avoid code duplication in suspend statistics update 2012-02-09 23:55:43 +01:00
Makefile PM / VT: Cleanup #if defined uglyness and fix compile error 2011-10-16 23:28:51 +02:00
power.h PM / Freezer: Thaw only kernel threads if freezing of kernel threads fails 2012-02-04 22:23:05 +01:00
poweroff.c Input: sysrq - drop tty argument from sysrq ops handlers 2010-08-19 22:07:06 -07:00
process.c PM / Freezer: Thaw only kernel threads if freezing of kernel threads fails 2012-02-04 22:23:05 +01:00
qos.c PM / QoS: Set cpu_dma_pm_qos->name 2011-11-07 23:02:24 +01:00
snapshot.c PM / Hibernate: Correct additional pages number calculation 2012-01-19 23:23:10 +01:00
suspend_test.c
suspend.c PM / Suspend: Avoid code duplication in suspend statistics update 2012-02-09 23:55:43 +01:00
swap.c PM / Hibernate: Drop the check of swap space size for compressed image 2012-01-14 00:41:37 +01:00
user.c PM / Hibernate: Thaw kernel threads in SNAPSHOT_CREATE_IMAGE ioctl path 2012-02-01 22:16:36 +01:00