acpi_power_meter: fix lockdep spew due to non-static lock class
PATCH 1/1 acpi_power_meter: fix lockdep spew due to non-static lock class
Similar to a30dcb4f which fixed asus_atk0110.ko, I recently received a bug report from someone hitting the same issue in acpi_power_meter.
[ 13.963168] power_meter ACPI000D:00: Found ACPI power meter. [ 13.963900] BUG: key ffff8802161f3920 not in .data! [ 13.963904] ------------[ cut here ]------------ [ 13.963915] WARNING: at kernel/lockdep.c:2986 lockdep_init_map+0x52f/0x560()
So let's fix that up for them by statically declaring the lockdep_class_key.
drivers/hwmon/acpi_power_meter.c +2 -0
@@ -632,6 +632,7 @@ static int register_ro_attrs(struct acpi_power_meter_resource *resource, sensors->dev_attr.show = ro->show; sensors->index = ro->index; +sysfs_attr_init (&sensors->dev_attr.attr); res =device_create_file (dev, &sensors->dev_attr);if (res) { sensors->dev_attr.attr.name =NULL ;
@@ -661,6 +662,7 @@ static int register_rw_attrs(struct acpi_power_meter_resource *resource, sensors->dev_attr.store = rw->set; sensors->index = rw->index; +sysfs_attr_init (&sensors->dev_attr.attr); res =device_create_file (dev, &sensors->dev_attr);if (res) { sensors->dev_attr.attr.name =NULL ;
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
AppliedQuoted 9 lines · Kyle McMartin
Similar to
a30dcb4fwhich fixed asus_atk0110.ko, I recently received a bug report from someone hitting the same issue inacpi_power_meter.[ 13.963168] power_meter ACPI000D:00: Found ACPI power meter. [ 13.963900] BUG: key ffff8802161f3920 not in .data! [ 13.963904] ------------[ cut here ]------------ [ 13.963915] WARNING: at kernel/lockdep.c:2986 lockdep_init_map+0x52f/0x560()
Quoted 5 lines
So let's fix that up for them by statically declaring the
lockdep_class_key.Signed-off-by Kyle McMartin <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors