aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-05-24 15:34:12 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-06-18 02:22:27 -0400
commitfb794e0f7153918c33f2300986d995524ab711cf (patch)
tree7d2c0654aa8a108aebf4aba5da86ba5ee6dfbcd5 /drivers/hwmon
parent3cdb2052a6e365ad56202874e6a8a05a2bb336fc (diff)
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')
-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,
358 else if (type == POWER_SENSOR) 358 else if (type == POWER_SENSOR)
359 sprintf(n, power_sensor_name_templates[func], "power", counter); 359 sprintf(n, power_sensor_name_templates[func], "power", counter);
360 360
361 sysfs_attr_init(&data->sensors[sensor].attr[func].dev_attr.attr);
361 data->sensors[sensor].attr[func].dev_attr.attr.name = n; 362 data->sensors[sensor].attr[func].dev_attr.attr.name = n;
362 data->sensors[sensor].attr[func].dev_attr.attr.mode = S_IRUGO; 363 data->sensors[sensor].attr[func].dev_attr.attr.mode = S_IRUGO;
363 data->sensors[sensor].attr[func].dev_attr.show = ibmpex_show_sensor; 364 data->sensors[sensor].attr[func].dev_attr.show = ibmpex_show_sensor;