cs5535-mfd: fix section mismatch
PATCH 1/1 cs5535-mfd: fix section mismatch
Silence following warnings:
WARNING: drivers/mfd/cs5535-mfd.o(.data+0x20): Section mismatch in reference from the variable cs5535_mfd_drv to the function .devinit.text:cs5535_mfd_probe() The variable cs5535_mfd_drv references
the function __devinit cs5535_mfd_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/mfd/cs5535-mfd.o(.data+0x28): Section mismatch in reference from the variable cs5535_mfd_drv to the function .devexit.text:cs5535_mfd_remove() The variable cs5535_mfd_drv references
the function __devexit cs5535_mfd_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
Rename the variable from *_drv to *_driver so modpost ignore the OK references to __devinit/__devexit functions.
--
drivers/mfd/cs5535-mfd.c +3 -3
@@ -179,7 +179,7 @@ static struct pci_device_id cs5535_mfd_pci_tbl[] = { };MODULE_DEVICE_TABLE (pci, cs5535_mfd_pci_tbl); -static struct pci_driver cs5535_mfd_drv = { +static struct pci_driver cs5535_mfd_driver = { .name =DRV_NAME , .id_table = cs5535_mfd_pci_tbl, .probe = cs5535_mfd_probe,
@@ -188,12 +188,12 @@ static struct pci_driver cs5535_mfd_drv = {static int __init cs5535_mfd_init (void ) { -return pci_register_driver (&cs5535_mfd_drv); +return pci_register_driver (&cs5535_mfd_driver); } static void __exit cs5535_mfd_exit(void) { -pci_unregister_driver (&cs5535_mfd_drv); +pci_unregister_driver (&cs5535_mfd_driver); }module_init (cs5535_mfd_init);
--
1.7.3.1
Quoted 53 lines · On Mon, 14 Nov 2011 20:12:24 +0000 Christian Gmeiner…
Silence following warnings:
WARNING: drivers/mfd/cs5535-mfd.o(.data+0x20): Section mismatch in reference from the variablecs5535_mfd_drvto the
function .devinit.text:cs5535_mfd_probe() The variablecs5535_mfd_drvreferences the function__devinitcs5535_mfd_probe()If the reference is valid then annotate the variable with __init* or__refdata(seelinux/init.h) or name the variable: *driver,*_template,*_timer,*_sht,*_ops,*_probe,*_probe_one,*_consoleWARNING: drivers/mfd/cs5535-mfd.o(.data+0x28): Section mismatch in reference from the variable
cs5535_mfd_drvto the function .devexit.text:cs5535_mfd_remove() The variablecs5535_mfd_drvreferences the function__devexitcs5535_mfd_remove()If the reference is valid then annotate the variable with __exit* (seelinux/init.h) or name the variable: *driver,*_template,*_timer,*_sht,*_ops,*_probe,*_probe_one,*_consoleRename the variable from
*_drvto*_driverso modpost ignore the OK references to __devinit/__devexit functions.Signed-off-by Christian Gmeiner <[email protected]>--
drivers/mfd/cs5535-mfd.c +3
-4@@ -179,7 +179,7 @@ static struct pci_device_id cs5535_mfd_pci_tbl[] = { };MODULE_DEVICE_TABLE (pci, cs5535_mfd_pci_tbl); -static struct pci_driver cs5535_mfd_drv = { +static struct pci_driver cs5535_mfd_driver = { .name =DRV_NAME , .id_table = cs5535_mfd_pci_tbl, .probe = cs5535_mfd_probe,@@ -188,12 +188,12 @@ static struct pci_driver cs5535_mfd_drv = {static int __init cs5535_mfd_init (void ) { -return pci_register_driver (&cs5535_mfd_drv); +return pci_register_driver (&cs5535_mfd_driver); } static void __exit cs5535_mfd_exit(void) { -pci_unregister_driver (&cs5535_mfd_drv); +pci_unregister_driver (&cs5535_mfd_driver); }module_init (cs5535_mfd_init); --1.7.3.1