diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-05-06 20:56:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-05-06 20:56:03 -0400 |
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) | |||
3043 | 3043 | ||
3044 | switch(dev->reg_state) { | 3044 | switch(dev->reg_state) { |
3045 | case NETREG_REGISTERING: | 3045 | case NETREG_REGISTERING: |
3046 | dev->reg_state = NETREG_REGISTERED; | ||
3047 | err = netdev_register_sysfs(dev); | 3046 | err = netdev_register_sysfs(dev); |
3048 | if (err) | 3047 | if (err) |
3049 | printk(KERN_ERR "%s: failed sysfs registration (%d)\n", | 3048 | printk(KERN_ERR "%s: failed sysfs registration (%d)\n", |
3050 | dev->name, err); | 3049 | dev->name, err); |
3050 | dev->reg_state = NETREG_REGISTERED; | ||
3051 | break; | 3051 | break; |
3052 | 3052 | ||
3053 | case NETREG_UNREGISTERING: | 3053 | case NETREG_UNREGISTERING: |