[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>
This commit is contained in:
Stephen Hemminger
2006-05-06 17:56:03 -07:00
committed by David S. Miller
parent 1498221d51
commit fe9925b551
3 changed files with 15 additions and 38 deletions

View File

@@ -506,6 +506,8 @@ struct net_device
/* class/net/name entry */
struct class_device class_dev;
/* space for optional statistics and wireless sysfs groups */
struct attribute_group *sysfs_groups[3];
};
#define NETDEV_ALIGN 32