From: Guenter Roeck Date: Thu, 28 Nov 2013 02:54:31 +0000 (-0800) Subject: sfc: Convert to use hwmon_device_register_with_groups X-Git-Tag: v3.13-rc3~28^2~16 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85493e6dd42dcaf0eaf0a19f12f1295e35cc3b7f;p=pandora-kernel.git 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 Signed-off-by: Guenter Roeck Signed-off-by: David S. Miller --- 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; }; Reading git-diff-tree failed