aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-05-24 15:16:40 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-05-27 05:24:54 -0400
commiteec752b2b99c794766926a9bac59b0d7df5b09c2 (patch)
tree09fff0636772e1e6a55330b730807946b07e8492 /drivers/hwmon
parent6777b9e47e4daf7116ec12b69e9b5cc980809217 (diff)
hwmon: (pmbus) Initialize sysfs attributes
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> Cc: stable@kernel.org # .39.x
Diffstat (limited to 'drivers/hwmon')
-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 98799bab69ce..354770ed3186 100644
--- a/drivers/hwmon/pmbus_core.c
+++ b/drivers/hwmon/pmbus_core.c
@@ -707,6 +707,7 @@ do { \
707 struct sensor_device_attribute *a \ 707 struct sensor_device_attribute *a \
708 = &data->_type##s[data->num_##_type##s].attribute; \ 708 = &data->_type##s[data->num_##_type##s].attribute; \
709 BUG_ON(data->num_attributes >= data->max_attributes); \ 709 BUG_ON(data->num_attributes >= data->max_attributes); \
710 sysfs_attr_init(&a->dev_attr.attr); \
710 a->dev_attr.attr.name = _name; \ 711 a->dev_attr.attr.name = _name; \
711 a->dev_attr.attr.mode = _mode; \ 712 a->dev_attr.attr.mode = _mode; \
712 a->dev_attr.show = _show; \ 713 a->dev_attr.show = _show; \