]> err.no Git - linux-2.6/blobdiff - arch/arm/mach-omap2/pm.c
[ARM] 4689/1: small comment wrap fix
[linux-2.6] / arch / arm / mach-omap2 / pm.c
index d7eee99b7e3fef12029d700f9550e6e0a96a3df7..baf7d82b458b968b61b1127e646cb17150812c0c 100644 (file)
  * 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/pm.h>
 #include <linux/interrupt.h>
 #include <linux/sysfs.h>
 #include <linux/module.h>
@@ -71,28 +70,12 @@ void omap2_pm_idle(void)
        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;
-
-       case PM_SUSPEND_DISK:
-               return -ENOTSUPP;
-
-       default:
-               return -EINVAL;
-       }
-
-       return error;
+       return 0;
 }
 
 #define INT0_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) |    \
@@ -353,9 +336,6 @@ static int omap2_pm_enter(suspend_state_t state)
        case PM_SUSPEND_MEM:
                ret = omap2_pm_suspend();
                break;
-       case PM_SUSPEND_DISK:
-               ret = -ENOTSUPP;
-               break;
        default:
                ret = -EINVAL;
        }
@@ -363,17 +343,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 = {
-       .pm_disk_mode   = 0,
+static struct platform_suspend_ops omap_pm_ops = {
        .prepare        = omap2_pm_prepare,
        .enter          = omap2_pm_enter,
        .finish         = omap2_pm_finish,
+       .valid          = suspend_valid_only_mem,
 };
 
 int __init omap2_pm_init(void)
@@ -397,7 +376,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;
 
        pmdomain_init();