summaryrefslogtreecommitdiff
path: root/drivers/hwmon/ibmpex.c
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-05-24 23:34:12 +0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-06-18 10:22:27 +0400
commitfb794e0f7153918c33f2300986d995524ab711cf (patch)
tree7d2c0654aa8a108aebf4aba5da86ba5ee6dfbcd5 /drivers/hwmon/ibmpex.c
parent3cdb2052a6e365ad56202874e6a8a05a2bb336fc (diff)
downloadlinux-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/hwmon/ibmpex.c')
-rw-r--r--drivers/hwmon/ibmpex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c
index 06d4eafcf76b..41dbf8161ed7 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;