summaryrefslogtreecommitdiff
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2013-09-27 14:47:45 +0400
committerRob Herring <rob.herring@calxeda.com>2013-10-02 01:30:20 +0400
commit60a66e370007e8535b7a561353b07b37deaf35ba (patch)
tree30bac2353ff9dd8f72b898b3933d0b14645ca251 /drivers/cpuidle
parent34a5eeb202eb43f36dd39a287669e0b686ddf728 (diff)
downloadlinux-60a66e370007e8535b7a561353b07b37deaf35ba.tar.xz
ARM: highbank: cpuidle: convert to platform driver
As the ux500 and the kirkwood driver, make the calxeda driver a platform driver [Compiled only] Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/cpuidle-calxeda.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/cpuidle/cpuidle-calxeda.c b/drivers/cpuidle/cpuidle-calxeda.c
index bed707ab6d6e..6d49527d4a0c 100644
--- a/drivers/cpuidle/cpuidle-calxeda.c
+++ b/drivers/cpuidle/cpuidle-calxeda.c
@@ -24,10 +24,10 @@
#include <linux/cpu_pm.h>
#include <linux/init.h>
#include <linux/io.h>
-#include <linux/of.h>
#include <linux/time.h>
#include <linux/delay.h>
#include <linux/suspend.h>
+#include <linux/platform_device.h>
#include <asm/cpuidle.h>
#include <asm/proc-fns.h>
#include <asm/smp_scu.h>
@@ -92,11 +92,17 @@ static struct cpuidle_driver calxeda_idle_driver = {
.state_count = 2,
};
-static int __init calxeda_cpuidle_init(void)
+static int __init calxeda_cpuidle_probe(struct platform_device *pdev)
{
- if (!of_machine_is_compatible("calxeda,highbank"))
- return -ENODEV;
-
return cpuidle_register(&calxeda_idle_driver, NULL);
}
-module_init(calxeda_cpuidle_init);
+
+static struct platform_driver calxeda_cpuidle_plat_driver = {
+ .driver = {
+ .name = "cpuidle-calxeda",
+ .owner = THIS_MODULE,
+ },
+ .probe = calxeda_cpuidle_probe,
+};
+
+module_platform_driver(calxeda_cpuidle_plat_driver);