From a9ec6bd1f7bccdc1304629f8fbb2e02035026307 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Thu, 19 Jul 2012 07:04:45 +0000 Subject: [PATCH] sfc: initialize dynamic sysfs attributes for lockdep Dynamically allocated sysfs attributes must be initialized using sysfs_attr_init(), otherwise lockdep complains: BUG: key
not in .data! Signed-off-by: Michal Schmidt Acked-by: Ben Hutchings Signed-off-by: David S. Miller --- drivers/net/ethernet/sfc/mcdi_mon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/sfc/mcdi_mon.c b/drivers/net/ethernet/sfc/mcdi_mon.c index fb7f65b..1d552f0 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; -- 2.7.4