PM / Hibernate: Migrate to ktime_t
[linux-2.6-block.git] / kernel / power / snapshot.c
index 791a61892bb536d5ce9296a1ceae1c1c1d0e7384..0c40c16174b4d8eb638a06efe159446ded6f2e71 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/list.h>
 #include <linux/slab.h>
 #include <linux/compiler.h>
+#include <linux/ktime.h>
 
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
@@ -1576,11 +1577,11 @@ int hibernate_preallocate_memory(void)
        struct zone *zone;
        unsigned long saveable, size, max_size, count, highmem, pages = 0;
        unsigned long alloc, save_highmem, pages_highmem, avail_normal;
-       struct timeval start, stop;
+       ktime_t start, stop;
        int error;
 
        printk(KERN_INFO "PM: Preallocating image memory... ");
-       do_gettimeofday(&start);
+       start = ktime_get();
 
        error = memory_bm_create(&orig_bm, GFP_IMAGE, PG_ANY);
        if (error)
@@ -1709,9 +1710,9 @@ int hibernate_preallocate_memory(void)
        free_unnecessary_pages();
 
  out:
-       do_gettimeofday(&stop);
+       stop = ktime_get();
        printk(KERN_CONT "done (allocated %lu pages)\n", pages);
-       swsusp_show_speed(&start, &stop, pages, "Allocated");
+       swsusp_show_speed(start, stop, pages, "Allocated");
 
        return 0;