diff options
-rw-r--r-- | drivers/acpi/bus.c | 11 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index a6dbcf4d9ef5..b9b69d9629b5 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -295,6 +295,17 @@ int acpi_bus_set_power(acpi_handle handle, int state) | |||
295 | 295 | ||
296 | EXPORT_SYMBOL(acpi_bus_set_power); | 296 | EXPORT_SYMBOL(acpi_bus_set_power); |
297 | 297 | ||
298 | bool acpi_bus_power_manageable(acpi_handle handle) | ||
299 | { | ||
300 | struct acpi_device *device; | ||
301 | int result; | ||
302 | |||
303 | result = acpi_bus_get_device(handle, &device); | ||
304 | return result ? false : device->flags.power_manageable; | ||
305 | } | ||
306 | |||
307 | EXPORT_SYMBOL(acpi_bus_power_manageable); | ||
308 | |||
298 | /* -------------------------------------------------------------------------- | 309 | /* -------------------------------------------------------------------------- |
299 | Event Management | 310 | Event Management |
300 | -------------------------------------------------------------------------- */ | 311 | -------------------------------------------------------------------------- */ |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index db90a74f8714..0c21ea3bb672 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -335,6 +335,7 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context); | |||
335 | int acpi_bus_get_status(struct acpi_device *device); | 335 | int acpi_bus_get_status(struct acpi_device *device); |
336 | int acpi_bus_get_power(acpi_handle handle, int *state); | 336 | int acpi_bus_get_power(acpi_handle handle, int *state); |
337 | int acpi_bus_set_power(acpi_handle handle, int state); | 337 | int acpi_bus_set_power(acpi_handle handle, int state); |
338 | bool acpi_bus_power_manageable(acpi_handle handle); | ||
338 | #ifdef CONFIG_ACPI_PROC_EVENT | 339 | #ifdef CONFIG_ACPI_PROC_EVENT |
339 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); | 340 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); |
340 | int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data); | 341 | int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data); |