From 36978bdf66717ad53d406e946e50656cad6b79c4 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Mon, 7 Jul 2008 03:30:55 +0200 Subject: [PATCH] --- yaml --- r: 102278 b: refs/heads/master c: 3737b2b1046900660b42e25c904b85e78139d25b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/acpi/bus.c | 11 +++++++++++ trunk/include/acpi/acpi_bus.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8d011b476e34..ce398fef5bcc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c6c4f070a61b2b6e5cd317a5fbf25255878688a2 +refs/heads/master: 3737b2b1046900660b42e25c904b85e78139d25b diff --git a/trunk/drivers/acpi/bus.c b/trunk/drivers/acpi/bus.c index a6dbcf4d9ef5..b9b69d9629b5 100644 --- a/trunk/drivers/acpi/bus.c +++ b/trunk/drivers/acpi/bus.c @@ -295,6 +295,17 @@ int acpi_bus_set_power(acpi_handle handle, int state) EXPORT_SYMBOL(acpi_bus_set_power); +bool acpi_bus_power_manageable(acpi_handle handle) +{ + struct acpi_device *device; + int result; + + result = acpi_bus_get_device(handle, &device); + return result ? false : device->flags.power_manageable; +} + +EXPORT_SYMBOL(acpi_bus_power_manageable); + /* -------------------------------------------------------------------------- Event Management -------------------------------------------------------------------------- */ diff --git a/trunk/include/acpi/acpi_bus.h b/trunk/include/acpi/acpi_bus.h index db90a74f8714..0c21ea3bb672 100644 --- a/trunk/include/acpi/acpi_bus.h +++ b/trunk/include/acpi/acpi_bus.h @@ -335,6 +335,7 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context); int acpi_bus_get_status(struct acpi_device *device); int acpi_bus_get_power(acpi_handle handle, int *state); int acpi_bus_set_power(acpi_handle handle, int state); +bool acpi_bus_power_manageable(acpi_handle handle); #ifdef CONFIG_ACPI_PROC_EVENT int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data);