Commit c7165d9a authored by Kai Germaschewski's avatar Kai Germaschewski

Make net_dev_init() an __initcall

If you were looking to find where net_dev_init() is called, you wouldn't
have guessed it's in drivers/block/genhd.c, would you?

Nothing should break if the __initcall net_dev_init is called too late
now, since register_netdevice() will call it for us in that case.
parent e2502377
...@@ -202,7 +202,6 @@ extern int blk_dev_init(void); ...@@ -202,7 +202,6 @@ extern int blk_dev_init(void);
#ifdef CONFIG_FUSION #ifdef CONFIG_FUSION
extern int fusion_init(void); extern int fusion_init(void);
#endif #endif
extern int net_dev_init(void);
extern int soc_probe(void); extern int soc_probe(void);
extern int atmdev_init(void); extern int atmdev_init(void);
extern int i2o_init(void); extern int i2o_init(void);
...@@ -226,9 +225,6 @@ int __init device_init(void) ...@@ -226,9 +225,6 @@ int __init device_init(void)
#ifdef CONFIG_BLK_CPQ_DA #ifdef CONFIG_BLK_CPQ_DA
cpqarray_init(); cpqarray_init();
#endif #endif
#ifdef CONFIG_NET
net_dev_init();
#endif
#ifdef CONFIG_ATM #ifdef CONFIG_ATM
(void) atmdev_init(); (void) atmdev_init();
#endif #endif
......
...@@ -2425,7 +2425,7 @@ static int dev_boot_phase = 1; ...@@ -2425,7 +2425,7 @@ static int dev_boot_phase = 1;
* will not get the same name. * will not get the same name.
*/ */
int net_dev_init(void); static int net_dev_init(void);
int register_netdevice(struct net_device *dev) int register_netdevice(struct net_device *dev)
{ {
...@@ -2691,7 +2691,7 @@ extern void dv_init(void); ...@@ -2691,7 +2691,7 @@ extern void dv_init(void);
* Callers must hold the rtnl semaphore. See the comment at the * Callers must hold the rtnl semaphore. See the comment at the
* end of Space.c for details about the locking. * end of Space.c for details about the locking.
*/ */
int __init net_dev_init(void) static int __init net_dev_init(void)
{ {
struct net_device *dev, **dp; struct net_device *dev, **dp;
int i; int i;
...@@ -2832,6 +2832,8 @@ int __init net_dev_init(void) ...@@ -2832,6 +2832,8 @@ int __init net_dev_init(void)
return 0; return 0;
} }
__initcall(net_dev_init);
#ifdef CONFIG_HOTPLUG #ifdef CONFIG_HOTPLUG
/* Notify userspace when a netdevice event occurs, /* Notify userspace when a netdevice event occurs,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment