summaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2013-04-23 08:54:43 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-23 13:45:23 +0200
commit30dc72c6fa91c640e98ce5ef5ec33fb2beb41ad2 (patch)
treea77ecc23dfc0fe8d8f0fe57f6728ff85bc07aee7 /drivers/cpuidle
parent0b210d96a6f9f8fc10bca482ca6f6d87bf52927e (diff)
downloadlinux-stable-30dc72c6fa91c640e98ce5ef5ec33fb2beb41ad2.tar.gz
linux-stable-30dc72c6fa91c640e98ce5ef5ec33fb2beb41ad2.tar.bz2
linux-stable-30dc72c6fa91c640e98ce5ef5ec33fb2beb41ad2.zip
ARM: kirkwood: cpuidle: use init/exit common routine
Remove the duplicated code and use the cpuidle common code for initialization. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Tested-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/cpuidle-kirkwood.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/cpuidle/cpuidle-kirkwood.c b/drivers/cpuidle/cpuidle-kirkwood.c
index 6f3152436983..53290e1f86c7 100644
--- a/drivers/cpuidle/cpuidle-kirkwood.c
+++ b/drivers/cpuidle/cpuidle-kirkwood.c
@@ -52,9 +52,6 @@ static struct cpuidle_driver kirkwood_idle_driver = {
},
.state_count = KIRKWOOD_MAX_STATES,
};
-static struct cpuidle_device *device;
-
-static DEFINE_PER_CPU(struct cpuidle_device, kirkwood_cpuidle_device);
/* Initialize CPU idle by registering the idle states */
static int kirkwood_cpuidle_probe(struct platform_device *pdev)
@@ -69,22 +66,12 @@ static int kirkwood_cpuidle_probe(struct platform_device *pdev)
if (IS_ERR(ddr_operation_base))
return PTR_ERR(ddr_operation_base);
- device = &per_cpu(kirkwood_cpuidle_device, smp_processor_id());
- device->state_count = KIRKWOOD_MAX_STATES;
-
- cpuidle_register_driver(&kirkwood_idle_driver);
- if (cpuidle_register_device(device)) {
- pr_err("kirkwood_init_cpuidle: Failed registering\n");
- return -EIO;
- }
- return 0;
+ return cpuidle_register(&kirkwood_idle_driver, NULL);
}
int kirkwood_cpuidle_remove(struct platform_device *pdev)
{
- cpuidle_unregister_device(device);
- cpuidle_unregister_driver(&kirkwood_idle_driver);
-
+ cpuidle_unregister(&kirkwood_idle_driver);
return 0;
}