aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2013-09-21 12:41:02 -0400
committerDaniel Lezcano <daniel.lezcano@linaro.org>2013-10-07 10:46:59 -0400
commit3e8ceca6c76ec2d5ee47ece0420cf10d041cf58f (patch)
treef34d5780f17e44a2989d7a5ce86c054a4790762d /drivers/cpuidle
parent4aa88fbe6d6f78a8a464445eb6b55a360e3d3733 (diff)
ARM: zynq: cpuidle: convert to platform driver
As the ux500 and the kirkwood driver, make the zynq driver a platform driver Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/cpuidle-zynq.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/cpuidle/cpuidle-zynq.c b/drivers/cpuidle/cpuidle-zynq.c
index ab6c4b4ffc7b..aded75928028 100644
--- a/drivers/cpuidle/cpuidle-zynq.c
+++ b/drivers/cpuidle/cpuidle-zynq.c
@@ -28,6 +28,7 @@
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/cpu_pm.h> 29#include <linux/cpu_pm.h>
30#include <linux/cpuidle.h> 30#include <linux/cpuidle.h>
31#include <linux/platform_device.h>
31#include <asm/proc-fns.h> 32#include <asm/proc-fns.h>
32#include <asm/cpuidle.h> 33#include <asm/cpuidle.h>
33 34
@@ -69,11 +70,19 @@ static struct cpuidle_driver zynq_idle_driver = {
69}; 70};
70 71
71/* Initialize CPU idle by registering the idle states */ 72/* Initialize CPU idle by registering the idle states */
72static int __init zynq_cpuidle_init(void) 73static int zynq_cpuidle_probe(struct platform_device *pdev)
73{ 74{
74 pr_info("Xilinx Zynq CpuIdle Driver started\n"); 75 pr_info("Xilinx Zynq CpuIdle Driver started\n");
75 76
76 return cpuidle_register(&zynq_idle_driver, NULL); 77 return cpuidle_register(&zynq_idle_driver, NULL);
77} 78}
78 79
79device_initcall(zynq_cpuidle_init); 80static struct platform_driver zynq_cpuidle_driver = {
81 .driver = {
82 .name = "cpuidle-zynq",
83 .owner = THIS_MODULE,
84 },
85 .probe = zynq_cpuidle_probe,
86};
87
88module_platform_driver(zynq_cpuidle_driver);