Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / arch / arm / mach-omap2 / cpuidle34xx.c
index 20785b2b0ec82f85c15d6175f70dc0c11c0fba76..e18709d3b95d906e79e070774e2c277d81b5f709 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/cpuidle.h>
 #include <linux/export.h>
 #include <linux/cpu_pm.h>
+#include <asm/cpuidle.h>
 
 #include "powerdomain.h"
 #include "clockdomain.h"
@@ -111,8 +112,6 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
 {
        struct omap3_idle_statedata *cx = &omap3_idle_data[index];
 
-       local_fiq_disable();
-
        if (omap_irq_pending() || need_resched())
                goto return_sleep_time;
 
@@ -147,7 +146,6 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
                clkdm_allow_idle(mpu_pd->pwrdm_clkdms[0]);
 
 return_sleep_time:
-       local_fiq_enable();
 
        return index;
 }
@@ -259,8 +257,6 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
        return ret;
 }
 
-static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
-
 static struct cpuidle_driver omap3_idle_driver = {
        .name             = "omap3_idle",
        .owner            = THIS_MODULE,
@@ -336,8 +332,6 @@ static struct cpuidle_driver omap3_idle_driver = {
  */
 int __init omap3_idle_init(void)
 {
-       struct cpuidle_device *dev;
-
        mpu_pd = pwrdm_lookup("mpu_pwrdm");
        core_pd = pwrdm_lookup("core_pwrdm");
        per_pd = pwrdm_lookup("per_pwrdm");
@@ -346,20 +340,5 @@ int __init omap3_idle_init(void)
        if (!mpu_pd || !core_pd || !per_pd || !cam_pd)
                return -ENODEV;
 
-       if (cpuidle_register_driver(&omap3_idle_driver)) {
-               pr_err("%s: CPUidle driver register failed\n", __func__);
-               return -EIO;
-       }
-
-       dev = &per_cpu(omap3_idle_dev, smp_processor_id());
-       dev->cpu = 0;
-
-       if (cpuidle_register_device(dev)) {
-               printk(KERN_ERR "%s: CPUidle register device failed\n",
-                      __func__);
-               cpuidle_unregister_driver(&omap3_idle_driver);
-               return -EIO;
-       }
-
-       return 0;
+       return cpuidle_register(&omap3_idle_driver, NULL);
 }
This page took 0.025927 seconds and 5 git commands to generate.