aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/pmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/pmc.c')
-rw-r--r--arch/sparc/kernel/pmc.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/arch/sparc/kernel/pmc.c b/arch/sparc/kernel/pmc.c
index 5e4563d86f1..8b7297faca7 100644
--- a/arch/sparc/kernel/pmc.c
+++ b/arch/sparc/kernel/pmc.c
@@ -11,11 +11,13 @@
#include <linux/pm.h>
#include <linux/of.h>
#include <linux/of_device.h>
+#include <linux/module.h>
#include <asm/io.h>
#include <asm/oplib.h>
#include <asm/uaccess.h>
#include <asm/auxio.h>
+#include <asm/processor.h>
/* Debug
*
@@ -51,8 +53,7 @@ static void pmc_swift_idle(void)
#endif
}
-static int __devinit pmc_probe(struct of_device *op,
- const struct of_device_id *match)
+static int pmc_probe(struct platform_device *op)
{
regs = of_ioremap(&op->resource[0], 0,
resource_size(&op->resource[0]), PMC_OBPNAME);
@@ -63,14 +64,14 @@ static int __devinit pmc_probe(struct of_device *op,
#ifndef PMC_NO_IDLE
/* Assign power management IDLE handler */
- pm_idle = pmc_swift_idle;
+ sparc_idle = pmc_swift_idle;
#endif
printk(KERN_INFO "%s: power management initialized\n", PMC_DEVNAME);
return 0;
}
-static struct of_device_id __initdata pmc_match[] = {
+static struct of_device_id pmc_match[] = {
{
.name = PMC_OBPNAME,
},
@@ -78,15 +79,18 @@ static struct of_device_id __initdata pmc_match[] = {
};
MODULE_DEVICE_TABLE(of, pmc_match);
-static struct of_platform_driver pmc_driver = {
- .name = "pmc",
- .match_table = pmc_match,
+static struct platform_driver pmc_driver = {
+ .driver = {
+ .name = "pmc",
+ .owner = THIS_MODULE,
+ .of_match_table = pmc_match,
+ },
.probe = pmc_probe,
};
static int __init pmc_init(void)
{
- return of_register_driver(&pmc_driver, &of_bus_type);
+ return platform_driver_register(&pmc_driver);
}
/* This driver is not critical to the boot process