aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 20785b2b0ec8..cca045c95fbf 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -26,6 +26,7 @@
26#include <linux/cpuidle.h> 26#include <linux/cpuidle.h>
27#include <linux/export.h> 27#include <linux/export.h>
28#include <linux/cpu_pm.h> 28#include <linux/cpu_pm.h>
29#include <asm/cpuidle.h>
29 30
30#include "powerdomain.h" 31#include "powerdomain.h"
31#include "clockdomain.h" 32#include "clockdomain.h"
@@ -259,8 +260,6 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
259 return ret; 260 return ret;
260} 261}
261 262
262static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
263
264static struct cpuidle_driver omap3_idle_driver = { 263static struct cpuidle_driver omap3_idle_driver = {
265 .name = "omap3_idle", 264 .name = "omap3_idle",
266 .owner = THIS_MODULE, 265 .owner = THIS_MODULE,
@@ -336,8 +335,6 @@ static struct cpuidle_driver omap3_idle_driver = {
336 */ 335 */
337int __init omap3_idle_init(void) 336int __init omap3_idle_init(void)
338{ 337{
339 struct cpuidle_device *dev;
340
341 mpu_pd = pwrdm_lookup("mpu_pwrdm"); 338 mpu_pd = pwrdm_lookup("mpu_pwrdm");
342 core_pd = pwrdm_lookup("core_pwrdm"); 339 core_pd = pwrdm_lookup("core_pwrdm");
343 per_pd = pwrdm_lookup("per_pwrdm"); 340 per_pd = pwrdm_lookup("per_pwrdm");
@@ -346,20 +343,5 @@ int __init omap3_idle_init(void)
346 if (!mpu_pd || !core_pd || !per_pd || !cam_pd) 343 if (!mpu_pd || !core_pd || !per_pd || !cam_pd)
347 return -ENODEV; 344 return -ENODEV;
348 345
349 if (cpuidle_register_driver(&omap3_idle_driver)) { 346 return cpuidle_register(&omap3_idle_driver, NULL);
350 pr_err("%s: CPUidle driver register failed\n", __func__);
351 return -EIO;
352 }
353
354 dev = &per_cpu(omap3_idle_dev, smp_processor_id());
355 dev->cpu = 0;
356
357 if (cpuidle_register_device(dev)) {
358 printk(KERN_ERR "%s: CPUidle register device failed\n",
359 __func__);
360 cpuidle_unregister_driver(&omap3_idle_driver);
361 return -EIO;
362 }
363
364 return 0;
365} 347}