mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
ACPI / battery: call ACPI notifier chain in acpi_battery_notify
Allow other drivers to subscribe to battery status notifications. Just like AC driver does. Signed-off-by: Alexander Mezin <mezin.alexander@gmail.com> Acked-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
f03be3525f
commit
411e0f77bd
@ -734,6 +734,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)
|
||||
acpi_bus_generate_netlink_event(device->pnp.device_class,
|
||||
dev_name(&device->dev), event,
|
||||
acpi_battery_present(battery));
|
||||
acpi_notifier_call_chain(device, event, acpi_battery_present(battery));
|
||||
/* acpi_battery_update could remove power_supply object */
|
||||
if (old && battery->bat.dev)
|
||||
power_supply_changed(&battery->bat);
|
||||
|
Loading…
Reference in New Issue
Block a user