diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-15 18:37:50 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-19 17:37:08 -0400 |
commit | 4c164ae7d8a7ee1f39b773d97794535c2c193b12 (patch) | |
tree | 533238152c7a0fb0a5c944f31c5740fa815a51c2 /drivers/acpi/device_pm.c | |
parent | b25c77efa71178f8281401e492e5c63cf7c34900 (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/device_pm.c')
-rw-r--r-- | drivers/acpi/device_pm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index 26d3fd718a04..afc808e93855 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, | |||
424 | unsigned long long d_min, d_max; | 424 | unsigned long long d_min, d_max; |
425 | bool wakeup = false; | 425 | bool wakeup = false; |
426 | 426 | ||
427 | if (d_max_in < ACPI_STATE_D0 || d_max_in > ACPI_STATE_D3) | 427 | if (d_max_in < ACPI_STATE_D0 || d_max_in > ACPI_STATE_D3_COLD) |
428 | return -EINVAL; | 428 | return -EINVAL; |
429 | 429 | ||
430 | if (d_max_in > ACPI_STATE_D3_HOT) { | 430 | 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, | |||
443 | * the lowest limit with the specified one. | 443 | * the lowest limit with the specified one. |
444 | */ | 444 | */ |
445 | d_min = ACPI_STATE_D0; | 445 | d_min = ACPI_STATE_D0; |
446 | d_max = ACPI_STATE_D3; | 446 | d_max = ACPI_STATE_D3_COLD; |
447 | 447 | ||
448 | /* | 448 | /* |
449 | * If present, _SxD methods return the minimum D-state (highest power | 449 | * 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, | |||
680 | return 0; | 680 | return 0; |
681 | 681 | ||
682 | power_state = acpi_dev_pm_get_state(dev, adev, system_state, | 682 | power_state = acpi_dev_pm_get_state(dev, adev, system_state, |
683 | ACPI_STATE_D3, NULL); | 683 | ACPI_STATE_D3_COLD, NULL); |
684 | if (power_state < ACPI_STATE_D0 || power_state > ACPI_STATE_D3) | 684 | if (power_state < ACPI_STATE_D0 || power_state > ACPI_STATE_D3_COLD) |
685 | return -EIO; | 685 | return -EIO; |
686 | 686 | ||
687 | return acpi_device_set_power(adev, power_state); | 687 | return acpi_device_set_power(adev, power_state); |