diff options
author | Eric W. Biederman <ebiederm@aristanetworks.com> | 2009-10-29 14:18:21 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-30 12:41:18 -0700 |
commit | 0c509a6c9393b27a8c5a01acd4a72616206cfc24 (patch) | |
tree | 4e6aa609537144de3d09e461528d22e7f448ef55 /net/core | |
parent | 0bd8d53656da72bc065766b5f2a05ca738020b8a (diff) | |
download | kernel-crypto-0c509a6c9393b27a8c5a01acd4a72616206cfc24.tar.gz kernel-crypto-0c509a6c9393b27a8c5a01acd4a72616206cfc24.tar.xz kernel-crypto-0c509a6c9393b27a8c5a01acd4a72616206cfc24.zip |
net: Allow devices to specify a device specific sysfs group.
This isn't beautifully abstracted, but it is simple,
simplifies uses and so far is only needed for the bonding driver.
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/net-sysfs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 89de182353b..157645c0da7 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -544,8 +544,11 @@ int netdev_register_kobject(struct net_device *net) dev_set_name(dev, "%s", net->name); #ifdef CONFIG_SYSFS - *groups++ = &netstat_group; + /* Allow for a device specific group */ + if (*groups) + groups++; + *groups++ = &netstat_group; #ifdef CONFIG_WIRELESS_EXT_SYSFS if (net->ieee80211_ptr) *groups++ = &wireless_group; |