diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-puv3.c | 16 | ||||
-rw-r--r-- | drivers/of/fdt.c | 1 | ||||
-rw-r--r-- | drivers/rtc/rtc-puv3.c | 22 |
3 files changed, 7 insertions, 32 deletions
diff --git a/drivers/i2c/busses/i2c-puv3.c b/drivers/i2c/busses/i2c-puv3.c index fac67394084..93709fbe30e 100644 --- a/drivers/i2c/busses/i2c-puv3.c +++ b/drivers/i2c/busses/i2c-puv3.c @@ -276,8 +276,6 @@ static int puv3_i2c_resume(struct platform_device *dev) #define puv3_i2c_resume NULL #endif -MODULE_ALIAS("platform:puv3_i2c"); - static struct platform_driver puv3_i2c_driver = { .probe = puv3_i2c_probe, .remove = __devexit_p(puv3_i2c_remove), @@ -289,18 +287,8 @@ static struct platform_driver puv3_i2c_driver = { } }; -static int __init puv3_i2c_init(void) -{ - return platform_driver_register(&puv3_i2c_driver); -} - -static void __exit puv3_i2c_exit(void) -{ - platform_driver_unregister(&puv3_i2c_driver); -} - -module_init(puv3_i2c_init); -module_exit(puv3_i2c_exit); +module_platform_driver(puv3_i2c_driver); MODULE_DESCRIPTION("PKUnity v3 I2C driver"); MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:puv3_i2c"); diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 91a375fb6ae..ea2bd1be264 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -23,6 +23,7 @@ #include <asm/machdep.h> #endif /* CONFIG_PPC */ +#include <asm/setup.h> #include <asm/page.h> char *of_fdt_get_string(struct boot_param_header *blob, u32 offset) diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index e4b6880aabd..ab0acaeb237 100644 --- a/drivers/rtc/rtc-puv3.c +++ b/drivers/rtc/rtc-puv3.c @@ -164,7 +164,7 @@ static int puv3_rtc_open(struct device *dev) int ret; ret = request_irq(puv3_rtc_alarmno, puv3_rtc_alarmirq, - IRQF_DISABLED, "pkunity-rtc alarm", rtc_dev); + 0, "pkunity-rtc alarm", rtc_dev); if (ret) { dev_err(dev, "IRQ%d error %d\n", puv3_rtc_alarmno, ret); @@ -172,7 +172,7 @@ static int puv3_rtc_open(struct device *dev) } ret = request_irq(puv3_rtc_tickno, puv3_rtc_tickirq, - IRQF_DISABLED, "pkunity-rtc tick", rtc_dev); + 0, "pkunity-rtc tick", rtc_dev); if (ret) { dev_err(dev, "IRQ%d error %d\n", puv3_rtc_tickno, ret); @@ -326,7 +326,7 @@ static int puv3_rtc_resume(struct platform_device *pdev) #define puv3_rtc_resume NULL #endif -static struct platform_driver puv3_rtcdrv = { +static struct platform_driver puv3_rtc_driver = { .probe = puv3_rtc_probe, .remove = __devexit_p(puv3_rtc_remove), .suspend = puv3_rtc_suspend, @@ -337,21 +337,7 @@ static struct platform_driver puv3_rtcdrv = { } }; -static char __initdata banner[] = "PKUnity-v3 RTC, (c) 2009 PKUnity Co.\n"; - -static int __init puv3_rtc_init(void) -{ - printk(banner); - return platform_driver_register(&puv3_rtcdrv); -} - -static void __exit puv3_rtc_exit(void) -{ - platform_driver_unregister(&puv3_rtcdrv); -} - -module_init(puv3_rtc_init); -module_exit(puv3_rtc_exit); +module_platform_driver(puv3_rtc_driver); MODULE_DESCRIPTION("RTC Driver for the PKUnity v3 chip"); MODULE_AUTHOR("Hu Dongliang"); |