aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-16 00:37:50 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-19 23:37:08 +0200
commit4c164ae7d8a7ee1f39b773d97794535c2c193b12 (patch)
tree533238152c7a0fb0a5c944f31c5740fa815a51c2 /drivers/acpi
parentb25c77efa71178f8281401e492e5c63cf7c34900 (diff)
ACPI / PM: Replace ACPI_STATE_D3 with ACPI_STATE_D3_COLD in device_pm.c
The two symbols ACPI_STATE_D3 and ACPI_STATE_D3_COLD actually represent the same number (4), but ACPI_STATE_D3 is slightly ambigugous, because it may not be clear that it really means D3cold and not D3hot at first sight. Remove that ambiguity from drivers/acpi/device_pm.c by making it use ACPI_STATE_D3_COLD everywhere instead of ACPI_STATE_D3. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/device_pm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index 26d3fd718a0..afc808e9385 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -424,7 +424,7 @@ static int acpi_dev_pm_get_state(struct device *dev, struct acpi_device *adev,
unsigned long long d_min, d_max;
bool wakeup = false;
- if (d_max_in < ACPI_STATE_D0 || d_max_in > ACPI_STATE_D3)
+ if (d_max_in < ACPI_STATE_D0 || d_max_in > ACPI_STATE_D3_COLD)
return -EINVAL;
if (d_max_in > ACPI_STATE_D3_HOT) {
@@ -443,7 +443,7 @@ static int acpi_dev_pm_get_state(struct device *dev, struct acpi_device *adev,
* the lowest limit with the specified one.
*/
d_min = ACPI_STATE_D0;
- d_max = ACPI_STATE_D3;
+ d_max = ACPI_STATE_D3_COLD;
/*
* If present, _SxD methods return the minimum D-state (highest power
@@ -680,8 +680,8 @@ static int acpi_dev_pm_low_power(struct device *dev, struct acpi_device *adev,
return 0;
power_state = acpi_dev_pm_get_state(dev, adev, system_state,
- ACPI_STATE_D3, NULL);
- if (power_state < ACPI_STATE_D0 || power_state > ACPI_STATE_D3)
+ ACPI_STATE_D3_COLD, NULL);
+ if (power_state < ACPI_STATE_D0 || power_state > ACPI_STATE_D3_COLD)
return -EIO;
return acpi_device_set_power(adev, power_state);