Pull cpuidle into release branch
[pandora-kernel.git] / arch / arm / mach-sa1100 / pm.c
index 786c853..246c573 100644 (file)
@@ -57,15 +57,7 @@ enum {       SLEEP_SAVE_SP = 0,
 static int sa11x0_pm_enter(suspend_state_t state)
 {
        unsigned long gpio, sleep_save[SLEEP_SAVE_SIZE];
-       struct timespec delta, rtc;
 
-       if (state != PM_SUSPEND_MEM)
-               return -EINVAL;
-
-       /* preserve current time */
-       rtc.tv_sec = RCNR;
-       rtc.tv_nsec = 0;
-       save_time_delta(&delta, &rtc);
        gpio = GPLR;
 
        /* save vital registers */
@@ -122,10 +114,6 @@ static int sa11x0_pm_enter(suspend_state_t state)
         */
        PSSR = PSSR_PH;
 
-       /* restore current time */
-       rtc.tv_sec = RCNR;
-       restore_time_delta(&delta, &rtc);
-
        return 0;
 }
 
@@ -134,17 +122,14 @@ unsigned long sleep_phys_sp(void *sp)
        return virt_to_phys(sp);
 }
 
-/*
- * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
- */
-static struct pm_ops sa11x0_pm_ops = {
-       .pm_disk_mode   = PM_DISK_FIRMWARE,
+static struct platform_suspend_ops sa11x0_pm_ops = {
        .enter          = sa11x0_pm_enter,
+       .valid          = suspend_valid_only_mem,
 };
 
 static int __init sa11x0_pm_init(void)
 {
-       pm_set_ops(&sa11x0_pm_ops);
+       suspend_set_ops(&sa11x0_pm_ops);
        return 0;
 }