Skip to content

Commit

Permalink
ACPI: battery drivers should call power_supply_changed()
Browse files Browse the repository at this point in the history
Calling kobject_uevent() directly is a layering violation.  In
particular, it means we'll miss updating the generic LED trigger.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Alan Jenkins authored and Len Brown committed Apr 4, 2010
1 parent e363a75 commit f79e1ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)
#ifdef CONFIG_ACPI_SYSFS_POWER
/* acpi_battery_update could remove power_supply object */
if (battery->bat.dev)
kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE);
power_supply_changed(&battery->bat);
#endif
}

Expand Down

0 comments on commit f79e1ce

Please sign in to comment.