Commit 411e0f77 authored by Alexander Mezin's avatar Alexander Mezin Committed by Rafael J. Wysocki

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: default avatarAlexander Mezin <mezin.alexander@gmail.com>
Acked-by: default avatarLan Tianyu <tianyu.lan@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent f03be352
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment