Skip to content

Commit

Permalink
hwmon: (pmbus) Initialize sysfs attributes
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Guenter Roeck committed May 27, 2011
1 parent 6777b9e commit eec752b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hwmon/pmbus_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,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; \
Expand Down

0 comments on commit eec752b

Please sign in to comment.