diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-07-01 10:27:25 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-07-01 10:27:25 +0200 |
commit | bc32134c0523c60989d2f2439e176601668a62a5 (patch) | |
tree | 03f63fc387e78592968a1f04ee4e173ca32fec20 /drivers/acpi/device_pm.c | |
parent | 1c6770a38a6652777b9d1592b66e0d8e7dfb6160 (diff) | |
parent | 066624c6a1733a72a67f1d06d35a2153e7d9082b (diff) |
Merge branch 'for-next' into for-linus
Merge the whole changes for 3.11-rc1 merge
Diffstat (limited to 'drivers/acpi/device_pm.c')
-rw-r--r-- | drivers/acpi/device_pm.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index 318fa32a141..31c217a4283 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c @@ -290,6 +290,26 @@ int acpi_bus_init_power(struct acpi_device *device) return 0; } +/** + * acpi_device_fix_up_power - Force device with missing _PSC into D0. + * @device: Device object whose power state is to be fixed up. + * + * Devices without power resources and _PSC, but having _PS0 and _PS3 defined, + * are assumed to be put into D0 by the BIOS. However, in some cases that may + * not be the case and this function should be used then. + */ +int acpi_device_fix_up_power(struct acpi_device *device) +{ + int ret = 0; + + if (!device->power.flags.power_resources + && !device->power.flags.explicit_get + && device->power.state == ACPI_STATE_D0) + ret = acpi_dev_pm_explicit_set(device, ACPI_STATE_D0); + + return ret; +} + int acpi_bus_update_power(acpi_handle handle, int *state_p) { struct acpi_device *device; |