diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-03-08 07:53:07 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-09 11:57:09 -0500 |
commit | 82c00b62c811142c8e7d3aef92fbf3fc77b83709 (patch) | |
tree | 1eb32c75295834d78e6db62472f5e28243e5184d /drivers/net | |
parent | 95c408a95f9b16c638566df57c070b408edf1a01 (diff) |
ibmtr: Drain rich supply of modpost warnings.
Building ibmtr as a module produces a spectacular pile of modpost warnings:
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:ibmtr_probe1 from .text between 'ibmtr_probe_card' (at offset 0x450) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:ibmtr_probe1 from .text between 'ibmtr_probe_card' (at offset 0x454) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:ibmtr_probe1 from .text between 'ibmtr_probe_card' (at offset 0x458) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:ibmtr_probe1 from .text between 'ibmtr_probe_card' (at offset 0x45c) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_portlist from .text between 'ibmtr_probe_card' (at offset 0x4e8) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_portlist from .text between 'ibmtr_probe_card' (at offset 0x4ec) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_portlist from .text between 'ibmtr_probe_card' (at offset 0x4f0) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_portlist from .text between 'ibmtr_probe_card' (at offset 0x4f4) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:find_turbo_adapters from .text between 'ibmtr_probe_card' (at offset 0x500) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:find_turbo_adapters from .text between 'ibmtr_probe_card' (at offset 0x504) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:find_turbo_adapters from .text between 'ibmtr_probe_card' (at offset 0x508) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:find_turbo_adapters from .text between 'ibmtr_probe_card' (at offset 0x50c) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_portlist from .text between 'ibmtr_probe_card' (at offset 0x520) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_portlist from .text between 'ibmtr_probe_card' (at offset 0x524) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_portlist from .text between 'ibmtr_probe_card' (at offset 0x528) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_portlist from .text between 'ibmtr_probe_card' (at offset 0x534) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data: from .text between 'ibmtr_probe_card' (at offset 0x540) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data: from .text between 'ibmtr_probe_card' (at offset 0x544) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data: from .text between 'ibmtr_probe_card' (at offset 0x548) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data: from .text between 'ibmtr_probe_card' (at offset 0x54c) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:ibmtr_probe1 from .text between 'ibmtr_probe_card' (at offset 0x558) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:ibmtr_probe1 from .text between 'ibmtr_probe_card' (at offset 0x55c) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:ibmtr_probe1 from .text between 'ibmtr_probe_card' (at offset 0x560) and 'ibmtr_reset_timer'
WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:ibmtr_probe1 from .text between 'ibmtr_probe_card' (at offset 0x564) and 'ibmtr_reset_timer'
Fix by making ibmtr_probe an __init function.
While at it, move move ibmtr_probe_card below ibmtr_probe so the protoype
for ibmtr_probe can be deleted.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/net/tokenring/ibmtr.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/tokenring/ibmtr.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index 0d97e10ccac5..36202e94ee91 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -186,7 +186,6 @@ static char __devinit *adapter_def(char type) | |||
186 | #define TRC_INITV 0x02 /* verbose init trace points */ | 186 | #define TRC_INITV 0x02 /* verbose init trace points */ |
187 | static unsigned char ibmtr_debug_trace = 0; | 187 | static unsigned char ibmtr_debug_trace = 0; |
188 | 188 | ||
189 | static int ibmtr_probe(struct net_device *dev); | ||
190 | static int ibmtr_probe1(struct net_device *dev, int ioaddr); | 189 | static int ibmtr_probe1(struct net_device *dev, int ioaddr); |
191 | static unsigned char get_sram_size(struct tok_info *adapt_info); | 190 | static unsigned char get_sram_size(struct tok_info *adapt_info); |
192 | static int trdev_init(struct net_device *dev); | 191 | static int trdev_init(struct net_device *dev); |
@@ -335,17 +334,6 @@ static void ibmtr_cleanup_card(struct net_device *dev) | |||
335 | #endif | 334 | #endif |
336 | } | 335 | } |
337 | 336 | ||
338 | int ibmtr_probe_card(struct net_device *dev) | ||
339 | { | ||
340 | int err = ibmtr_probe(dev); | ||
341 | if (!err) { | ||
342 | err = register_netdev(dev); | ||
343 | if (err) | ||
344 | ibmtr_cleanup_card(dev); | ||
345 | } | ||
346 | return err; | ||
347 | } | ||
348 | |||
349 | /**************************************************************************** | 337 | /**************************************************************************** |
350 | * ibmtr_probe(): Routine specified in the network device structure | 338 | * ibmtr_probe(): Routine specified in the network device structure |
351 | * to probe for an IBM Token Ring Adapter. Routine outline: | 339 | * to probe for an IBM Token Ring Adapter. Routine outline: |
@@ -358,7 +346,7 @@ int ibmtr_probe_card(struct net_device *dev) | |||
358 | * which references it. | 346 | * which references it. |
359 | ****************************************************************************/ | 347 | ****************************************************************************/ |
360 | 348 | ||
361 | static int ibmtr_probe(struct net_device *dev) | 349 | static int __init ibmtr_probe(struct net_device *dev) |
362 | { | 350 | { |
363 | int i; | 351 | int i; |
364 | int base_addr = dev->base_addr; | 352 | int base_addr = dev->base_addr; |
@@ -378,6 +366,17 @@ static int ibmtr_probe(struct net_device *dev) | |||
378 | return -ENODEV; | 366 | return -ENODEV; |
379 | } | 367 | } |
380 | 368 | ||
369 | int __init ibmtr_probe_card(struct net_device *dev) | ||
370 | { | ||
371 | int err = ibmtr_probe(dev); | ||
372 | if (!err) { | ||
373 | err = register_netdev(dev); | ||
374 | if (err) | ||
375 | ibmtr_cleanup_card(dev); | ||
376 | } | ||
377 | return err; | ||
378 | } | ||
379 | |||
381 | /*****************************************************************************/ | 380 | /*****************************************************************************/ |
382 | 381 | ||
383 | static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | 382 | static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) |