diff options
author | Nigel Cunningham <nigel@tuxonice.net> | 2009-12-06 10:16:07 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-12-06 10:16:07 -0500 |
commit | 8e60c6a1348e17e68ad73589a52a03876e7059be (patch) | |
tree | 320d06254eabd0367e36c65233e6394f83308e8e /kernel/power/swsusp.c | |
parent | 0414f2ec03d72dc4e569627e6112fa6dafc99a79 (diff) |
PM / Hibernate: Shift remaining code from swsusp.c to hibernate.c
Shift the remaining declaration of the variable in_suspend and the
function swsusp_show_speed from swsusp.c to hibernate.c, and delete
swsusp.c.
Signed-off-by: Nigel Cunningham <nigel@tuxonice.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power/swsusp.c')
-rw-r--r-- | kernel/power/swsusp.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 57222d2089b8..5b3601bd1893 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
@@ -56,32 +56,3 @@ | |||
56 | #include "power.h" | 56 | #include "power.h" |
57 | 57 | ||
58 | int in_suspend __nosavedata = 0; | 58 | int in_suspend __nosavedata = 0; |
59 | |||
60 | /** | ||
61 | * swsusp_show_speed - print the time elapsed between two events represented by | ||
62 | * @start and @stop | ||
63 | * | ||
64 | * @nr_pages - number of pages processed between @start and @stop | ||
65 | * @msg - introductory message to print | ||
66 | */ | ||
67 | |||
68 | void swsusp_show_speed(struct timeval *start, struct timeval *stop, | ||
69 | unsigned nr_pages, char *msg) | ||
70 | { | ||
71 | s64 elapsed_centisecs64; | ||
72 | int centisecs; | ||
73 | int k; | ||
74 | int kps; | ||
75 | |||
76 | elapsed_centisecs64 = timeval_to_ns(stop) - timeval_to_ns(start); | ||
77 | do_div(elapsed_centisecs64, NSEC_PER_SEC / 100); | ||
78 | centisecs = elapsed_centisecs64; | ||
79 | if (centisecs == 0) | ||
80 | centisecs = 1; /* avoid div-by-zero */ | ||
81 | k = nr_pages * (PAGE_SIZE / 1024); | ||
82 | kps = (k * 100) / centisecs; | ||
83 | printk(KERN_INFO "PM: %s %d kbytes in %d.%02d seconds (%d.%02d MB/s)\n", | ||
84 | msg, k, | ||
85 | centisecs / 100, centisecs % 100, | ||
86 | kps / 1000, (kps % 1000) / 10); | ||
87 | } | ||