ACPI / battery: call ACPI notifier chain in acpi_battery_notify
authorAlexander Mezin <mezin.alexander@gmail.com>
Tue, 11 Mar 2014 17:58:47 +0000 (00:58 +0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 19 Mar 2014 00:57:46 +0000 (01:57 +0100)
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>
drivers/acpi/battery.c

index bfec70f12faa9031f77e9ca24c23ed722194a490..9a2c63b2005038476e5a5e77360fd836aad3f25f 100644 (file)
@@ -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);