hwmon: (ibmpex) Initialize sysfs attributes
PATCH 4/5 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.
---
Compile tested only.
drivers/hwmon/ibmpex.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/hwmon/ibmpex.c +1 -0
@@ -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;
Signature · 7 lines
1.7.3.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH 4/5] hwmon: (ibmpex) Initialize sysfs
Quoted 6 lines · Guenter Roeck
Initialize dynamically allocated sysfs attributes before
device_create_file()call to suppresslockdep_init_map()warning if lockdep debugging is enabled.Signed-off-by Guenter Roeck <[email protected]>---
Compile tested only.
Can't test either, but looks good to me:
Candidate for stable series?
Quoted 16 lines
drivers/hwmon/ibmpex.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/hwmon/ibmpex.c +1
-0@@ -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;
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedRe: [lm-sensors] [PATCH 4/5] hwmon: (ibmpex) Initialize sysfs
In reply to Guenter RoeckQuoted 4 lines · Jean Delvare
Quoted 3 lines · Guenter Roeck
Initialize dynamically allocated sysfs attributes before
device_create_file()call to suppresslockdep_init_map()warning if lockdep debugging is enabled.
Quoted 8 lines
Quoted 3 lines
Signed-off-by Guenter Roeck <[email protected]>---
Compile tested only.Can't test either, but looks good to me:
Acked-by Jean Delvare <[email protected]>
Applied,
Quoted 2 lines
Candidate for stable series?
Yes, added Cc:.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors