summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/power.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-22 12:56:16 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-22 12:56:16 +0100
commit87e753b0065f94314ebdacf6593a172cdd7839c8 (patch)
treec2c44ee42101182bcf811019c92ee1a89025654c /drivers/acpi/power.c
parente78adb7595a9d585c60a7497345cb6eaeaaacefb (diff)
downloadop-kernel-dev-87e753b0065f94314ebdacf6593a172cdd7839c8.zip
op-kernel-dev-87e753b0065f94314ebdacf6593a172cdd7839c8.tar.gz
ACPI / PM: Sanitize checks in acpi_power_on_resources()
After the only user of acpi_power_on_resources(), acpi_bus_init_power(), has been changed to avoid calling it for state equal to ACPI_STATE_D3_COLD, it doesn't have to special case that state any more. For this reason, modify the checks in acpi_power_on_resources() so that it returns -EINVAL for ACPI_STATE_D3_COLD as it should. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/power.c')
-rw-r--r--drivers/acpi/power.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 089a7c39..6db261c 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -622,12 +622,9 @@ int acpi_power_get_inferred_state(struct acpi_device *device, int *state)
int acpi_power_on_resources(struct acpi_device *device, int state)
{
- if (!device || state < ACPI_STATE_D0 || state > ACPI_STATE_D3_COLD)
+ if (!device || state < ACPI_STATE_D0 || state > ACPI_STATE_D3_HOT)
return -EINVAL;
- if (state == ACPI_STATE_D3_COLD)
- return 0;
-
return acpi_power_on_list(&device->power.states[state].resources);
}
OpenPOWER on IntegriCloud