From 68b92b567c0c5e6f4d0b264d438f97ee5ccbdccc Mon Sep 17 00:00:00 2001 From: Mark Langsdorf Date: Tue, 11 Aug 2009 15:15:42 -0500 Subject: ACPI: add AC/DC notifier Add an ACPI event notifier for AC/DC connect/disconnect events. Signed-off-by: Mark Langsdorf Signed-off-by: Len Brown --- drivers/acpi/ac.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/acpi') diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 98b9690b015..b6ed60b57b0 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -245,6 +245,7 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event) acpi_bus_generate_netlink_event(device->pnp.device_class, dev_name(&device->dev), event, (u32) ac->state); + acpi_notifier_call_chain(device, event, (u32) ac->state); #ifdef CONFIG_ACPI_SYSFS_POWER kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); #endif -- cgit v1.2.3 From c4c4e2a58996d774429ded2fe386e88b47a10e98 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Fri, 9 Oct 2009 15:53:24 +0200 Subject: ACPI: Kconfig, fix proc aggregator text Fix two typos in the Kconfig text about ACPI_PROCESSOR_AGGREGATOR. Signed-off-by: Jiri Slaby Signed-off-by: Len Brown --- drivers/acpi/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 0ed42d8870c..93d2c7971df 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -218,10 +218,10 @@ config ACPI_PROCESSOR_AGGREGATOR depends on X86 help ACPI 4.0 defines processor Aggregator, which enables OS to perform - specfic processor configuration and control that applies to all + specific processor configuration and control that applies to all processors in the platform. Currently only logical processor idling is defined, which is to reduce power consumption. This driver - support the new device. + supports the new device. config ACPI_THERMAL tristate "Thermal Zone" -- cgit v1.2.3 From 2c907b72db4dd4e8af6dccb6e0ac122d78627b8d Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Wed, 7 Oct 2009 14:39:46 -0700 Subject: ACPI button: don't try to use a non-existent lid device If a call comes in to check the lid state but there's no lid device present, we should return -ENODEV. Signed-off-by: Jesse Barnes Signed-off-by: Len Brown --- drivers/acpi/button.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/acpi') diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 9335b87c517..0c9c6a9a002 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -251,6 +251,9 @@ int acpi_lid_open(void) acpi_status status; unsigned long long state; + if (!lid_device) + return -ENODEV; + status = acpi_evaluate_integer(lid_device->handle, "_LID", NULL, &state); if (ACPI_FAILURE(status)) -- cgit v1.2.3