mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
ACPI: add AC/DC notifier
Add an ACPI event notifier for AC/DC connect/disconnect events. Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
374576a8b6
commit
68b92b567c
@ -245,6 +245,7 @@ static void acpi_ac_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,
|
||||||
(u32) ac->state);
|
(u32) ac->state);
|
||||||
|
acpi_notifier_call_chain(device, event, (u32) ac->state);
|
||||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||||
kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
|
kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user