]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/pm.c
Merge current mainline tree into linux-omap tree
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / pm.c
index daf0b2da7844133c243a2db23bd539784bdbbe71..b0a95d774b0249d3011672df42e09d737fc0c1fc 100644 (file)
@@ -20,7 +20,7 @@
  * published by the Free Software Foundation.
  */
 
-#include <linux/pm.h>
+#include <linux/suspend.h>
 #include <linux/sched.h>
 #include <linux/proc_fs.h>
 #include <linux/interrupt.h>
@@ -581,23 +581,13 @@ out:
        local_irq_enable();
 }
 
-static int omap2_pm_prepare(suspend_state_t state)
+static int omap2_pm_prepare(void)
 {
-       int error = 0;
-
        /* We cannot sleep in idle until we have resumed */
        saved_idle = pm_idle;
        pm_idle = NULL;
 
-       switch (state) {
-       case PM_SUSPEND_STANDBY:
-       case PM_SUSPEND_MEM:
-               break;
-       default:
-               return -EINVAL;
-       }
-
-       return error;
+       return 0;
 }
 
 static int omap2_pm_suspend(void)
@@ -635,17 +625,16 @@ static int omap2_pm_enter(suspend_state_t state)
        return ret;
 }
 
-static int omap2_pm_finish(suspend_state_t state)
+static void omap2_pm_finish(void)
 {
        pm_idle = saved_idle;
-       return 0;
 }
 
-static struct pm_ops omap_pm_ops = {
+static struct platform_suspend_ops omap_pm_ops = {
        .prepare        = omap2_pm_prepare,
        .enter          = omap2_pm_enter,
        .finish         = omap2_pm_finish,
-       .valid          = pm_valid_only_mem,
+       .valid          = suspend_valid_only_mem,
 };
 
 static void __init prcm_setup_regs(void)
@@ -817,7 +806,7 @@ int __init omap2_pm_init(void)
        omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend,
                                            omap24xx_cpu_suspend_sz);
 
-       pm_set_ops(&omap_pm_ops);
+       suspend_set_ops(&omap_pm_ops);
        pm_idle = omap2_pm_idle;
 
        l = subsys_create_file(&power_subsys, &sleep_while_idle_attr);