public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ACPI / battery: call ACPI notifier chain in acpi_battery_notify
@ 2014-03-09 22:37 Alexander Mezin
  2014-03-09 22:37 ` [PATCH 2/2] ACPI / AC: recheck adapter status upon battery notifications Alexander Mezin
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Mezin @ 2014-03-09 22:37 UTC (permalink / raw)
  To: linux-acpi; +Cc: Lan Tianyu, Alexander Mezin

Allow other drivers to subscribe to battery status notifications.
Just like AC driver does.

Signed-off-by: Alexander Mezin <mezin.alexander@gmail.com>
---
 drivers/acpi/battery.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 797a693..8c98fd6 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -736,6 +736,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);
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-10  0:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-09 22:37 [PATCH 1/2] ACPI / battery: call ACPI notifier chain in acpi_battery_notify Alexander Mezin
2014-03-09 22:37 ` [PATCH 2/2] ACPI / AC: recheck adapter status upon battery notifications Alexander Mezin
2014-03-09 23:11   ` Rafael J. Wysocki
2014-03-09 23:21     ` Alexander Mezin
2014-03-10  0:17       ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox