diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-05-06 17:56:03 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-05-06 17:56:03 -0700 |
commit | fe9925b551a95fae6ec61470c79f8b701a2fe928 (patch) | |
tree | 3df1817dee3c804d155e3a1c52b6ff696bc60293 /net/core/dev.c | |
parent | 1498221d51a43d5fa1a580618591497d90f957d9 (diff) |
[NET]: Create netdev attribute_groups with class_device_add
Atomically create attributes when class device is added. This avoids
the race between registering class_device (which generates hotplug
event), and the creation of attribute groups.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 3bad1afc89fa..9ab3cfa58466 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3043,11 +3043,11 @@ void netdev_run_todo(void) switch(dev->reg_state) { case NETREG_REGISTERING: - dev->reg_state = NETREG_REGISTERED; err = netdev_register_sysfs(dev); if (err) printk(KERN_ERR "%s: failed sysfs registration (%d)\n", dev->name, err); + dev->reg_state = NETREG_REGISTERED; break; case NETREG_UNREGISTERING: |