]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sfc: initialize dynamic sysfs attributes for lockdep
authorMichal Schmidt <mschmidt@redhat.com>
Thu, 19 Jul 2012 07:04:45 +0000 (07:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Jul 2012 17:48:08 +0000 (10:48 -0700)
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>
drivers/net/ethernet/sfc/mcdi_mon.c

index fb7f65b59eb819f176d76dbbb133932bcba76183..1d552f0664d71268d9f57cb6953519f550c4de75 100644 (file)
@@ -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;