diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-03-08 10:33:16 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-09 11:57:09 -0500 |
commit | 95c408a95f9b16c638566df57c070b408edf1a01 (patch) | |
tree | 9c7a9beb21c199112ca07fcad161a03938abd3b0 | |
parent | fe79745507593941adb44a6b2e392645c54ca1c2 (diff) |
3c59x: Fix several modpost warnings
WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4580) and 'vortex_eisa_remove'
WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4584) and 'vortex_eisa_remove'
WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4588) and 'vortex_eisa_remove'
WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x458c) and 'vortex_eisa_remove'
Fixed by:
o move definition of vortex_eisa_driver below the functions it references.
o remove now unnecessary prototypes for vortex_eisa_probe and
vortex_eisa_remove.
o Make vortex_eisa_probe an __init function.
o Make vortex_eisa_remove a __devexit function.
o Wrap vortex_eisa_driver reference to vortex_eisa_remove with
__devexit_p().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/net/3c59x.c | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/net/3c59x.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 72995777f809..b406ecfa7268 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -858,19 +858,7 @@ static struct eisa_device_id vortex_eisa_ids[] = { | |||
858 | }; | 858 | }; |
859 | MODULE_DEVICE_TABLE(eisa, vortex_eisa_ids); | 859 | MODULE_DEVICE_TABLE(eisa, vortex_eisa_ids); |
860 | 860 | ||
861 | static int vortex_eisa_probe(struct device *device); | 861 | static int __init vortex_eisa_probe(struct device *device) |
862 | static int vortex_eisa_remove(struct device *device); | ||
863 | |||
864 | static struct eisa_driver vortex_eisa_driver = { | ||
865 | .id_table = vortex_eisa_ids, | ||
866 | .driver = { | ||
867 | .name = "3c59x", | ||
868 | .probe = vortex_eisa_probe, | ||
869 | .remove = vortex_eisa_remove | ||
870 | } | ||
871 | }; | ||
872 | |||
873 | static int vortex_eisa_probe(struct device *device) | ||
874 | { | 862 | { |
875 | void __iomem *ioaddr; | 863 | void __iomem *ioaddr; |
876 | struct eisa_device *edev; | 864 | struct eisa_device *edev; |
@@ -893,7 +881,7 @@ static int vortex_eisa_probe(struct device *device) | |||
893 | return 0; | 881 | return 0; |
894 | } | 882 | } |
895 | 883 | ||
896 | static int vortex_eisa_remove(struct device *device) | 884 | static int __devexit vortex_eisa_remove(struct device *device) |
897 | { | 885 | { |
898 | struct eisa_device *edev; | 886 | struct eisa_device *edev; |
899 | struct net_device *dev; | 887 | struct net_device *dev; |
@@ -918,7 +906,17 @@ static int vortex_eisa_remove(struct device *device) | |||
918 | free_netdev(dev); | 906 | free_netdev(dev); |
919 | return 0; | 907 | return 0; |
920 | } | 908 | } |
921 | #endif | 909 | |
910 | static struct eisa_driver vortex_eisa_driver = { | ||
911 | .id_table = vortex_eisa_ids, | ||
912 | .driver = { | ||
913 | .name = "3c59x", | ||
914 | .probe = vortex_eisa_probe, | ||
915 | .remove = __devexit_p(vortex_eisa_remove) | ||
916 | } | ||
917 | }; | ||
918 | |||
919 | #endif /* CONFIG_EISA */ | ||
922 | 920 | ||
923 | /* returns count found (>= 0), or negative on error */ | 921 | /* returns count found (>= 0), or negative on error */ |
924 | static int __init vortex_eisa_init(void) | 922 | static int __init vortex_eisa_init(void) |