From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
Aaron Lu <aaron.lu@intel.com>, Lan Tianyu <tianyu.lan@intel.com>
Subject: [PATCH 2/4] ACPI / PM: Replace ACPI_STATE_D3 with ACPI_STATE_D3_COLD in device_pm.c
Date: Fri, 14 Jun 2013 14:31:46 +0200 [thread overview]
Message-ID: <5718188.sCHoszPloi@vostro.rjw.lan> (raw)
In-Reply-To: <6895318.cKDBc4OdI0@vostro.rjw.lan>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
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>
---
drivers/acpi/device_pm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: linux-pm/drivers/acpi/device_pm.c
===================================================================
--- linux-pm.orig/drivers/acpi/device_pm.c
+++ linux-pm/drivers/acpi/device_pm.c
@@ -424,7 +424,7 @@ static int acpi_dev_pm_get_state(struct
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
* 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
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);
next prev parent reply other threads:[~2013-06-14 12:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 12:29 [PATCH 0/4] ACPI / PM: Cleanups and device power state selection rework Rafael J. Wysocki
2013-06-14 12:31 ` [PATCH 1/4] ACPI / PM: Rename function acpi_device_power_state() and make it static Rafael J. Wysocki
2013-06-14 12:31 ` Rafael J. Wysocki [this message]
2013-06-14 12:32 ` [PATCH 3/4] ACPI / PM: Rework and clean up acpi_dev_pm_get_state() Rafael J. Wysocki
2013-06-27 8:11 ` Aaron Lu
2013-06-27 12:09 ` Rafael J. Wysocki
2013-06-28 7:53 ` Aaron Lu
2013-06-14 12:33 ` [PATCH 4/4] ACPI / PM: Drop two functions that are not used any more Rafael J. Wysocki
2013-06-18 9:20 ` Aaron Lu
2013-06-18 13:00 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5718188.sCHoszPloi@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=aaron.lu@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=tianyu.lan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®