提交 411e0f77 编写于 作者: A Alexander Mezin 提交者: 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: NAlexander Mezin <mezin.alexander@gmail.com>
Acked-by: NLan Tianyu <tianyu.lan@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 f03be352
...@@ -734,6 +734,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) ...@@ -734,6 +734,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)
acpi_bus_generate_netlink_event(device->pnp.device_class, acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event, dev_name(&device->dev), event,
acpi_battery_present(battery)); acpi_battery_present(battery));
acpi_notifier_call_chain(device, event, acpi_battery_present(battery));
/* acpi_battery_update could remove power_supply object */ /* acpi_battery_update could remove power_supply object */
if (old && battery->bat.dev) if (old && battery->bat.dev)
power_supply_changed(&battery->bat); power_supply_changed(&battery->bat);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册