summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-05-24 12:16:40 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-03 09:32:34 +0900
commitf40e1a49dbb9bd52bb7a8ddbf98b4520e33a3190 (patch)
tree4d70f6199b20ee2828cd72caad04fb0e10e8f903
parent17fdfc59e1cdf37689f5747ed527dbd5961b2010 (diff)
hwmon: (pmbus) Initialize sysfs attributes
commit eec752b2b99c794766926a9bac59b0d7df5b09c2 upstream. Initialize sysfs attrs before device_create_file() call to suppress lockdep_init_map() warning: WARNING: at kernel/lockdep.c:2701 lockdep_init_map+0x12d/0x140() Reviewed-by: Robert Coulson <robert.coulson@ericsson.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/hwmon/pmbus_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus_core.c b/drivers/hwmon/pmbus_core.c
index 196ffafafd8..7df490ec55f 100644
--- a/drivers/hwmon/pmbus_core.c
+++ b/drivers/hwmon/pmbus_core.c
@@ -700,6 +700,7 @@ do { \
struct sensor_device_attribute *a \
= &data->_type##s[data->num_##_type##s].attribute; \
BUG_ON(data->num_attributes >= data->max_attributes); \
+ sysfs_attr_init(&a->dev_attr.attr); \
a->dev_attr.attr.name = _name; \
a->dev_attr.attr.mode = _mode; \
a->dev_attr.show = _show; \