linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: ACPI Devel Mailing List <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Len Brown <lenb@kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>
Subject: [PATCH] ACPI / PM: Fix error message in __acpi_bus_set_power()
Date: Mon, 14 May 2012 22:53:56 +0200	[thread overview]
Message-ID: <201205142253.57023.rjw@sisk.pl> (raw)

From: Rafael J. Wysocki <rjw@sisk.pl>

After recent changes of the ACPI device low-power states definitions
an error message in __acpi_bus_set_power() needs to be updated so
that it prints the correct name of the state that has been requested
(currently it will print "D3" for D3hot and "D4" for D3cold).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/acpi/bus.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux/drivers/acpi/bus.c
===================================================================
--- linux.orig/drivers/acpi/bus.c
+++ linux/drivers/acpi/bus.c
@@ -240,7 +240,9 @@ static int __acpi_bus_set_power(struct a
 	}
 
 	if (!device->power.states[state].flags.valid) {
-		printk(KERN_WARNING PREFIX "Device does not support D%d\n", state);
+		printk(KERN_WARNING PREFIX "Device does not support D%d%s\n",
+			state == ACPI_STATE_D3_COLD ? 3 : state,
+			state == ACPI_STATE_D3_HOT ? "hot" : "");
 		return -ENODEV;
 	}
 	if (device->parent && (state < device->parent->power.state)) {

             reply	other threads:[~2012-05-14 20:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-14 20:53 Rafael J. Wysocki [this message]
2012-05-18 20:56 ` [PATCH] ACPI / PM: Fix error message in __acpi_bus_set_power() Rafael J. Wysocki
2012-05-18 20:58 ` [PATCH 0/2] ACPI / PM: Fixes related to new definitions of device power states Rafael J. Wysocki
2012-05-18 21:00   ` [PATCH 1/2] ACPI / PM: Fix error messages in drivers/acpi/bus.c Rafael J. Wysocki
2012-05-20 10:01     ` Andreas Mohr
2012-05-20 12:10       ` Rafael J. Wysocki
2012-05-18 21:01   ` [PATCH 2/2] ACPI / PM: Make __acpi_bus_get_power() cover D3cold correctly 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=201205142253.57023.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).