diff options
author | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-05-24 19:34:12 (GMT) |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-06-18 06:22:27 (GMT) |
commit | fb794e0f7153918c33f2300986d995524ab711cf (patch) | |
tree | 7d2c0654aa8a108aebf4aba5da86ba5ee6dfbcd5 /drivers | |
parent | 3cdb2052a6e365ad56202874e6a8a05a2bb336fc (diff) | |
download | linux-fb794e0f7153918c33f2300986d995524ab711cf.tar.xz |
hwmon: (ibmpex) Initialize sysfs attributes
Initialize dynamically allocated sysfs attributes before device_create_file()
call to suppress lockdep_init_map() warning if lockdep debugging is enabled.
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.34+
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/ibmpex.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c index 06d4eaf..41dbf81 100644 --- a/drivers/hwmon/ibmpex.c +++ b/drivers/hwmon/ibmpex.c @@ -358,6 +358,7 @@ static int create_sensor(struct ibmpex_bmc_data *data, int type, else if (type == POWER_SENSOR) sprintf(n, power_sensor_name_templates[func], "power", counter); + sysfs_attr_init(&data->sensors[sensor].attr[func].dev_attr.attr); data->sensors[sensor].attr[func].dev_attr.attr.name = n; data->sensors[sensor].attr[func].dev_attr.attr.mode = S_IRUGO; data->sensors[sensor].attr[func].dev_attr.show = ibmpex_show_sensor; |