summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-07-19 11:04:45 +0400
committerDavid S. Miller <davem@davemloft.net>2012-07-19 21:48:08 +0400
commita9ec6bd1f7bccdc1304629f8fbb2e02035026307 (patch)
tree9e13743e64eca444fc9828b72c9fcbdfa062c028 /drivers/net/ethernet/sfc
parent8427b2acfdd5e6c554fb7ad1fbccf53a24a08454 (diff)
downloadlinux-a9ec6bd1f7bccdc1304629f8fbb2e02035026307.tar.xz
sfc: initialize dynamic sysfs attributes for lockdep
Dynamically allocated sysfs attributes must be initialized using sysfs_attr_init(), otherwise lockdep complains: BUG: key <address> not in .data! Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/mcdi_mon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi_mon.c b/drivers/net/ethernet/sfc/mcdi_mon.c
index fb7f65b59eb8..1d552f0664d7 100644
--- a/drivers/net/ethernet/sfc/mcdi_mon.c
+++ b/drivers/net/ethernet/sfc/mcdi_mon.c
@@ -222,6 +222,7 @@ efx_mcdi_mon_add_attr(struct efx_nic *efx, const char *name,
attr->index = index;
attr->type = type;
attr->limit_value = limit_value;
+ sysfs_attr_init(&attr->dev_attr.attr);
attr->dev_attr.attr.name = attr->name;
attr->dev_attr.attr.mode = S_IRUGO;
attr->dev_attr.show = reader;