diff options
-rw-r--r-- | arch/arm/mach-at91/cpuidle.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c index 0130df7f0524..48f1228c611c 100644 --- a/arch/arm/mach-at91/cpuidle.c +++ b/arch/arm/mach-at91/cpuidle.c | |||
@@ -27,8 +27,6 @@ | |||
27 | 27 | ||
28 | #define AT91_MAX_STATES 2 | 28 | #define AT91_MAX_STATES 2 |
29 | 29 | ||
30 | static DEFINE_PER_CPU(struct cpuidle_device, at91_cpuidle_device); | ||
31 | |||
32 | /* Actual code that puts the SoC in different idle states */ | 30 | /* Actual code that puts the SoC in different idle states */ |
33 | static int at91_enter_idle(struct cpuidle_device *dev, | 31 | static int at91_enter_idle(struct cpuidle_device *dev, |
34 | struct cpuidle_driver *drv, | 32 | struct cpuidle_driver *drv, |
@@ -60,20 +58,9 @@ static struct cpuidle_driver at91_idle_driver = { | |||
60 | }; | 58 | }; |
61 | 59 | ||
62 | /* Initialize CPU idle by registering the idle states */ | 60 | /* Initialize CPU idle by registering the idle states */ |
63 | static int at91_init_cpuidle(void) | 61 | static int __init at91_init_cpuidle(void) |
64 | { | 62 | { |
65 | struct cpuidle_device *device; | 63 | return cpuidle_register(&at91_idle_driver, NULL); |
66 | |||
67 | device = &per_cpu(at91_cpuidle_device, smp_processor_id()); | ||
68 | device->state_count = AT91_MAX_STATES; | ||
69 | |||
70 | cpuidle_register_driver(&at91_idle_driver); | ||
71 | |||
72 | if (cpuidle_register_device(device)) { | ||
73 | printk(KERN_ERR "at91_init_cpuidle: Failed registering\n"); | ||
74 | return -EIO; | ||
75 | } | ||
76 | return 0; | ||
77 | } | 64 | } |
78 | 65 | ||
79 | device_initcall(at91_init_cpuidle); | 66 | device_initcall(at91_init_cpuidle); |