olpc_battery: Fix section mismatch noise
authorAnton Vorontsov <cbouatmailru@gmail.com>
Thu, 24 Nov 2011 18:49:07 +0000 (22:49 +0400)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Thu, 24 Nov 2011 18:51:52 +0000 (22:51 +0400)
This patch fixes the following noise (by renaming _drv to _driver):

WARNING: drivers/power/olpc_battery.o(.data+0x100): Section mismatch in reference from the variable olpc_battery_drv to the function .devinit.text:olpc_battery_probe()
The variable olpc_battery_drv references
the function __devinit olpc_battery_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/power/olpc_battery.o(.data+0x104): Section mismatch in reference from the variable olpc_battery_drv to the function .devexit.text:olpc_battery_remove()
The variable olpc_battery_drv references
the function __devexit olpc_battery_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/power/olpc_battery.o(.data+0x128): Section mismatch in reference from the variable olpc_battery_drv to the variable .devinit.rodata:olpc_battery_ids
The variable olpc_battery_drv references
the variable __devinitconst olpc_battery_ids
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

Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
drivers/power/olpc_battery.c

index 46a2f07edab10cf47ef40eee8438e66d9474ac0c..dc60f61a3b9ec4275e660ab1faab658db16a1bdc 100644 (file)
@@ -627,7 +627,7 @@ static const struct of_device_id olpc_battery_ids[] __devinitconst = {
 };
 MODULE_DEVICE_TABLE(of, olpc_battery_ids);
 
-static struct platform_driver olpc_battery_drv = {
+static struct platform_driver olpc_battery_driver = {
        .driver = {
                .name = "olpc-battery",
                .owner = THIS_MODULE,
@@ -640,13 +640,13 @@ static struct platform_driver olpc_battery_drv = {
 
 static int __init olpc_bat_init(void)
 {
-       return platform_driver_register(&olpc_battery_drv);
+       return platform_driver_register(&olpc_battery_driver);
 }
 module_init(olpc_bat_init);
 
 static void __exit olpc_bat_exit(void)
 {
-       platform_driver_unregister(&olpc_battery_drv);
+       platform_driver_unregister(&olpc_battery_driver);
 }
 module_exit(olpc_bat_exit);