[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:

committed by
David S. Miller

parent
1498221d51
commit
fe9925b551
@@ -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
|
||||
|
Reference in New Issue
Block a user