diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-05-10 16:21:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-05-10 16:21:17 -0400 |
commit | b17a7c179dd3ce7d04373fddf660eda21efc9db9 (patch) | |
tree | 9f141fc2919a0aab95237812f48fa3cd0a169806 /include/linux/netdevice.h | |
parent | a50bb7b9af9a7c39b2aba15678eb686ae428718c (diff) |
[NET]: Do sysfs registration as part of register_netdevice.
The last step of netdevice registration was being done by a delayed
call, but because it was delayed, it was impossible to return any error
code if the class_device registration failed.
Side effects:
* one state in registration process is unnecessary.
* register_netdevice can sleep inside class_device registration/hotplug
* code in netdev_run_todo only does unregistration so it is simpler.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a461b51d6076..f4169bbb60eb 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -433,8 +433,7 @@ struct net_device | |||
433 | 433 | ||
434 | /* register/unregister state machine */ | 434 | /* register/unregister state machine */ |
435 | enum { NETREG_UNINITIALIZED=0, | 435 | enum { NETREG_UNINITIALIZED=0, |
436 | NETREG_REGISTERING, /* called register_netdevice */ | 436 | NETREG_REGISTERED, /* completed register_netdevice */ |
437 | NETREG_REGISTERED, /* completed register todo */ | ||
438 | NETREG_UNREGISTERING, /* called unregister_netdevice */ | 437 | NETREG_UNREGISTERING, /* called unregister_netdevice */ |
439 | NETREG_UNREGISTERED, /* completed unregister todo */ | 438 | NETREG_UNREGISTERED, /* completed unregister todo */ |
440 | NETREG_RELEASED, /* called free_netdev */ | 439 | NETREG_RELEASED, /* called free_netdev */ |