NET: declance: Fix section mismatches
authorRalf Baechle <ralf@linux-mips.org>
Mon, 26 Jul 2010 18:08:14 +0000 (19:08 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 26 Jul 2010 18:08:14 +0000 (19:08 +0100)
WARNING: drivers/net/built-in.o(.data+0x24): Section mismatch in reference from
the variable dec_lance_tc_driver to the function .init.text:dec_lance_tc_probe()
The variable dec_lance_tc_driver references
the function __init dec_lance_tc_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Fixing this one results in a new mismatch:

WARNING: drivers/net/built-in.o(.devinit.text+0x14): Section mismatch in reference from the function dec_lance_tc_probe() to the function .init.text:dec_lance_probe()
The function __devinit dec_lance_tc_probe() references
a function __init dec_lance_probe().
If dec_lance_probe is only used by dec_lance_tc_probe then
annotate dec_lance_probe with a matching annotation.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/net/declance.c

index 1d973db27c32752241eb4ed8355163406e9e9fb7..d7de376d7178ad2b9470797d5cab92846277e363 100644 (file)
@@ -1022,7 +1022,7 @@ static const struct net_device_ops lance_netdev_ops = {
        .ndo_set_mac_address    = eth_mac_addr,
 };
 
        .ndo_set_mac_address    = eth_mac_addr,
 };
 
-static int __init dec_lance_probe(struct device *bdev, const int type)
+static int __devinit dec_lance_probe(struct device *bdev, const int type)
 {
        static unsigned version_printed;
        static const char fmt[] = "declance%d";
 {
        static unsigned version_printed;
        static const char fmt[] = "declance%d";
@@ -1326,7 +1326,7 @@ static void __exit dec_lance_platform_remove(void)
 }
 
 #ifdef CONFIG_TC
 }
 
 #ifdef CONFIG_TC
-static int __init dec_lance_tc_probe(struct device *dev);
+static int __devinit dec_lance_tc_probe(struct device *dev);
 static int __exit dec_lance_tc_remove(struct device *dev);
 
 static const struct tc_device_id dec_lance_tc_table[] = {
 static int __exit dec_lance_tc_remove(struct device *dev);
 
 static const struct tc_device_id dec_lance_tc_table[] = {
@@ -1345,7 +1345,7 @@ static struct tc_driver dec_lance_tc_driver = {
        },
 };
 
        },
 };
 
-static int __init dec_lance_tc_probe(struct device *dev)
+static int __devinit dec_lance_tc_probe(struct device *dev)
 {
         int status = dec_lance_probe(dev, PMAD_LANCE);
         if (!status)
 {
         int status = dec_lance_probe(dev, PMAD_LANCE);
         if (!status)