hwmon: (ibmaem) Initialize sysfs attributes
PATCH 3/5 hwmon: (ibmaem) 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/ibmaem.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/hwmon/ibmaem.c +2 -0
@@ -947,6 +947,7 @@ static int aem_register_sensors(struct aem_data *data,/* Set up read-only sensors */ while (ro->label) { +sysfs_attr_init (&sensors->dev_attr.attr); sensors->dev_attr.attr.name = ro->label; sensors->dev_attr.attr.mode =S_IRUGO ; sensors->dev_attr.show = ro->show;
@@ -963,6 +964,7 @@ static int aem_register_sensors(struct aem_data *data,/* Set up read-write sensors */ while (rw->label) { +sysfs_attr_init (&sensors->dev_attr.attr); sensors->dev_attr.attr.name = rw->label; sensors->dev_attr.attr.mode =S_IRUGO |S_IWUSR ; sensors->dev_attr.show = rw->show;
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 3/5] hwmon: (ibmaem) 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 24 lines
drivers/hwmon/ibmaem.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/hwmon/ibmaem.c +2
-0@@ -947,6 +947,7 @@ static int aem_register_sensors(struct aem_data *data,/* Set up read-only sensors */ while (ro->label) { +sysfs_attr_init (&sensors->dev_attr.attr); sensors->dev_attr.attr.name = ro->label; sensors->dev_attr.attr.mode =S_IRUGO ; sensors->dev_attr.show = ro->show;@@ -963,6 +964,7 @@ static int aem_register_sensors(struct aem_data *data,/* Set up read-write sensors */ while (rw->label) { +sysfs_attr_init (&sensors->dev_attr.attr); sensors->dev_attr.attr.name = rw->label; sensors->dev_attr.attr.mode =S_IRUGO |S_IWUSR ; sensors->dev_attr.show = rw->show;
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 3/5] hwmon: (ibmaem) 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, I added the necessary Cc:
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors