aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/mcdi.h
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-11-27 18:54:31 -0800
committerDavid S. Miller <davem@davemloft.net>2013-11-29 16:26:16 -0500
commit85493e6dd42dcaf0eaf0a19f12f1295e35cc3b7f (patch)
treec6f26f8195e7e54301e71d3727a0c20142d2b08f /drivers/net/ethernet/sfc/mcdi.h
parentnet: smc91: fix crash regression on the versatile (diff)
downloadlinux-dev-85493e6dd42dcaf0eaf0a19f12f1295e35cc3b7f.tar.xz
linux-dev-85493e6dd42dcaf0eaf0a19f12f1295e35cc3b7f.zip
sfc: Convert to use hwmon_device_register_with_groups
Simplify the code. Avoid race conditions caused by attributes being created after hwmon device registration. Implicitly (through hwmon API) add mandatory 'name' sysfs attribute. Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/mcdi.h')
-rw-r--r--drivers/net/ethernet/sfc/mcdi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h
index 656a3277c2b2..15816cacb548 100644
--- a/drivers/net/ethernet/sfc/mcdi.h
+++ b/drivers/net/ethernet/sfc/mcdi.h
@@ -75,6 +75,8 @@ struct efx_mcdi_mon {
unsigned long last_update;
struct device *device;
struct efx_mcdi_mon_attribute *attrs;
+ struct attribute_group group;
+ const struct attribute_group *groups[2];
unsigned int n_attrs;
};