]> bbs.cooldavid.org Git - net-next-2.6.git/commit - net/core/dev.c
[NET]: Do sysfs registration as part of register_netdevice.
authorStephen Hemminger <shemminger@osdl.org>
Wed, 10 May 2006 20:21:17 +0000 (13:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 May 2006 20:21:17 +0000 (13:21 -0700)
commitb17a7c179dd3ce7d04373fddf660eda21efc9db9
tree9f141fc2919a0aab95237812f48fa3cd0a169806
parenta50bb7b9af9a7c39b2aba15678eb686ae428718c
[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>
include/linux/netdevice.h
net/core/dev.c