From eb52d5801302a3515506891c13338fbaa7222f36 Mon Sep 17 00:00:00 2001 From: Yu Yue Date: Fri, 26 Aug 2011 18:03:42 +0800 Subject: of: add include asm/setup.h in drivers/of/fdt.c In the file drivers/of/fdt.c, it uses the COMMAND_LINE_SIZE which is stated in asm/setup.h, so asm/setup.h should be included in drivers/of/fdt.c. Signed-off-by: Yu Yue Signed-off-by: Guan Xuetao Cc: Grant Likerly Cc: devicetree-discuss@lists.ozlabs.org Cc: Arnd Bergmann --- drivers/of/fdt.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 91a375f..ea2bd1b 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -23,6 +23,7 @@ #include #endif /* CONFIG_PPC */ +#include #include char *of_fdt_get_string(struct boot_param_header *blob, u32 offset) -- cgit v1.1 From a9196b0bd3284fa3388998c9208a708a8f2e4c83 Mon Sep 17 00:00:00 2001 From: Guan Xuetao Date: Fri, 23 Dec 2011 09:15:39 +0800 Subject: rtc-puv3: irq: remove IRQF_DISABLED This flag is deprecated, so is removed now. Signed-off-by: Yong Zhang Signed-off-by: Guan Xuetao --- drivers/rtc/rtc-puv3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index e4b6880..540ead3 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); -- cgit v1.1 From 858af58f67d4aba8afb02438e74292b9273cdb10 Mon Sep 17 00:00:00 2001 From: Guan Xuetao Date: Mon, 26 Dec 2011 16:59:34 +0800 Subject: i2c-puv3: using module_platform_driver() This patch converts the driver to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin Signed-off-by: Guan Xuetao --- drivers/i2c/busses/i2c-puv3.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'drivers') diff --git a/drivers/i2c/busses/i2c-puv3.c b/drivers/i2c/busses/i2c-puv3.c index fac6739..93709fb 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"); -- cgit v1.1 From 60e2b00ea200e1527668bfb766ecbdf578ad7de8 Mon Sep 17 00:00:00 2001 From: Guan Xuetao Date: Mon, 26 Dec 2011 17:03:50 +0800 Subject: rtc-puv3: using module_platform_driver() This patch converts the driver to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin Signed-off-by: Guan Xuetao --- drivers/rtc/rtc-puv3.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'drivers') diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index 540ead3..6490a02 100644 --- a/drivers/rtc/rtc-puv3.c +++ b/drivers/rtc/rtc-puv3.c @@ -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_rtcdrv); MODULE_DESCRIPTION("RTC Driver for the PKUnity v3 chip"); MODULE_AUTHOR("Hu Dongliang"); -- cgit v1.1 From b3a0aa3ae1c0889ffe8abb2e326d5c74c7c9c097 Mon Sep 17 00:00:00 2001 From: Guan Xuetao Date: Wed, 28 Dec 2011 09:24:29 +0800 Subject: rtc-puv3: solve section mismatch in rtc-puv3.c The patch renames puv3_rtcdrv to puv3_rtc_driver, so that modpost will know that this is simply a list of pointers to driver functions, in which case the section mismatch is OK. (Thanks Michal Marek) Cc: Axel Lin Cc: Michal Marek Cc: Arnd Bergmann Cc: Alessandro Zummo Cc: rtc-linux@googlegroups.com Signed-off-by: Guan Xuetao -- Section mismatch warning information: WARNING: drivers/rtc/built-in.o(.data+0x90): Section mismatch in reference from the variable puv3_rtcdrv to the function .devinit.text:puv3_rtc_probe() The variable puv3_rtcdrv references the function __devinit puv3_rtc_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: drivers/rtc/built-in.o(.data+0x94): Section mismatch in reference from the variable puv3_rtcdrv to the function .devexit.text:puv3_rtc_remove() The variable puv3_rtcdrv references the function __devexit puv3_rtc_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: drivers/built-in.o(.data+0x6c04): Section mismatch in reference from the variable puv3_rtcdrv to the function .devinit.text:puv3_rtc_probe() The variable puv3_rtcdrv references the function __devinit puv3_rtc_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: drivers/built-in.o(.data+0x6c08): Section mismatch in reference from the variable puv3_rtcdrv to the function .devexit.text:puv3_rtc_remove() The variable puv3_rtcdrv references the function __devexit puv3_rtc_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: vmlinux.o(.data+0x1126c): Section mismatch in reference from the variable puv3_rtcdrv to the function .devinit.text:puv3_rtc_probe() The variable puv3_rtcdrv references the function __devinit puv3_rtc_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: vmlinux.o(.data+0x11270): Section mismatch in reference from the variable puv3_rtcdrv to the function .devexit.text:puv3_rtc_remove() The variable puv3_rtcdrv references the function __devexit puv3_rtc_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console --- drivers/rtc/rtc-puv3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index 6490a02..ab0acae 100644 --- a/drivers/rtc/rtc-puv3.c +++ b/drivers/rtc/rtc-puv3.c @@ -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,7 +337,7 @@ static struct platform_driver puv3_rtcdrv = { } }; -module_platform_driver(puv3_rtcdrv); +module_platform_driver(puv3_rtc_driver); MODULE_DESCRIPTION("RTC Driver for the PKUnity v3 chip"); MODULE_AUTHOR("Hu Dongliang"); -- cgit v1.1