mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Andrew Grover <andrew.grover@intel.com>,
	Rusty trivial patch monkey Russell  <trivial@rustcorp.com.au>,
	ACPI mailing list <acpi-devel@lists.sourceforge.net>,
	kernel list <linux-kernel@vger.kernel.org>
Subject: ACPI sleep: stupid bug reintroduced
Date: Tue, 1 Oct 2002 23:40:45 +0200	[thread overview]
Message-ID: <20021001214045.GA1178@elf.ucw.cz> (raw)

Hi!

There's extremely stupid bug in sleep.c -- it will only alow user to
enter *unsupported* states. What's even worse that I remember fixing
that once before, and *it was merged to mainline*.

Please, really merge it to all copies so it is not reintroduced again.

[Oh, at it also makes S4 transition fail when SWSUSP support is not
there.]

								Pavel

--- clean/drivers/acpi/sleep.c	2002-09-22 23:46:56.000000000 +0200
+++ linux-swsusp/drivers/acpi/sleep.c	2002-10-01 23:38:48.000000000 +0200
@@ -329,8 +329,8 @@
 	state_string[count] = '\0';
 	
 	state = simple_strtoul(state_string, NULL, 0);
-	
-	if (sleep_states[state])
+
+	if (!sleep_states[state])
 		return_VALUE(-ENODEV);
 
 #ifdef CONFIG_SOFTWARE_SUSPEND
@@ -338,7 +338,10 @@
 		software_suspend();
 		return_VALUE(count);
 	}
+#else
+	return_VALUE(-ENODEV);
 #endif
+
 	status = acpi_suspend(state);
 
 	if (ACPI_FAILURE(status))


-- 
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?

             reply	other threads:[~2002-10-01 22:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-01 21:40 Pavel Machek [this message]
2002-10-01 22:41 Grover, Andrew

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=20021001214045.GA1178@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=acpi-devel@lists.sourceforge.net \
    --cc=andrew.grover@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@rustcorp.com.au \
    /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®