Skip to content

Commit a13925a

Browse files
Paul Gortmakerdavem330
authored andcommitted
net: cris: make eth_v10.c explicitly non-modular
The Makefile/Kconfig currently controlling compilation of this code is: drivers/net/cris/Makefile:obj-$(CONFIG_ETRAX_ARCH_V10) += eth_v10.o arch/cris/Kconfig:config ETRAX_ARCH_V10 arch/cris/Kconfig: bool ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. There was a one line wrapper for the int init function, which made no sense; hence we just put the device_initcall on the true init function itself and delete the pointless wrapper. In doing that we get rid of the following compile warning: WARNING: drivers/net/built-in.o(.text+0x1e28): Section mismatch in reference from the function etrax_init_module() to the function .init.text:etrax_ethernet_init() We don't replace module.h with init.h since the file already has that. Cc: "David S. Miller" <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Jesper Nilsson <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 17a032b commit a13925a

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/net/cris/eth_v10.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
*
88
*/
99

10-
11-
#include <linux/module.h>
12-
1310
#include <linux/kernel.h>
1411
#include <linux/delay.h>
1512
#include <linux/types.h>
@@ -411,6 +408,7 @@ etrax_ethernet_init(void)
411408
led_next_time = jiffies;
412409
return 0;
413410
}
411+
device_initcall(etrax_ethernet_init)
414412

415413
/* set MAC address of the interface. called from the core after a
416414
* SIOCSIFADDR ioctl, and from the bootup above.
@@ -1714,11 +1712,6 @@ e100_netpoll(struct net_device* netdev)
17141712
}
17151713
#endif
17161714

1717-
static int
1718-
etrax_init_module(void)
1719-
{
1720-
return etrax_ethernet_init();
1721-
}
17221715

17231716
static int __init
17241717
e100_boot_setup(char* str)
@@ -1741,5 +1734,3 @@ e100_boot_setup(char* str)
17411734
}
17421735

17431736
__setup("etrax100_eth=", e100_boot_setup);
1744-
1745-
module_init(etrax_init_module);

0 commit comments

Comments
 (0)