Skip to contentSkip to conversation

ACPI: suspend: clear leftovers from S4BIOS.

PATCH In review Alexey Starikovskiy 2 participants 2 messages Feb 21, 2008 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: suspend: clear leftovers from S4BIOS.

S4BIOS is not supported, so there is no reason to expect it as input and try to do something wrong.

---

 drivers/acpi/sleep/main.c |    2 --
 drivers/acpi/sleep/proc.c |    5 -----
 2 files changed, 0 insertions(+), 7 deletions(-)
drivers/acpi/sleep/main.c +0 -2
index 293a1cb..3e85a68 100644
@@ -403,8 +403,6 @@ int acpi_suspend(u32 acpi_state)
 
 	if (acpi_state < 6 && states[acpi_state])
 		return pm_suspend(states[acpi_state]);
-	if (acpi_state == 4)
-		return hibernate();
 	return -EINVAL;
 }
 
drivers/acpi/sleep/proc.c +0 -5
index f8df521..f530757 100644
@@ -60,11 +60,6 @@ acpi_system_write_sleep(struct file *file,
 	if (copy_from_user(str, buffer, count))
 		return -EFAULT;
 
-	/* Check for S4 bios request */
-	if (!strcmp(str, "4b")) {
-		error = acpi_suspend(4);
-		goto Done;
-	}
 	state = simple_strtoul(str, NULL, 0);
 #ifdef CONFIG_HIBERNATION
 	if (state == 4) {
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Alexey Starikovskiy

S4BIOS is not supported, so there is no reason to expect it as input and try to do something wrong.

Quoted 42 lines

---

 drivers/acpi/sleep/main.c |    2 --
 drivers/acpi/sleep/proc.c |    5 -----
 2 files changed, 0 insertions(+), 7 deletions(-)
drivers/acpi/sleep/main.c +0 -2
index 293a1cb..3e85a68 100644
@@ -403,8 +403,6 @@ int acpi_suspend(u32 acpi_state)
 
 	if (acpi_state < 6 && states[acpi_state])
 		return pm_suspend(states[acpi_state]);
-	if (acpi_state == 4)
-		return hibernate();
 	return -EINVAL;
 }
 
drivers/acpi/sleep/proc.c +0 -6
index f8df521..f530757 100644
@@ -60,11 +60,6 @@ acpi_system_write_sleep(struct file *file,
 	if (copy_from_user(str, buffer, count))
 		return -EFAULT;
 
-	/* Check for S4 bios request */
-	if (!strcmp(str, "4b")) {
-		error = acpi_suspend(4);
-		goto Done;
-	}
 	state = simple_strtoul(str, NULL, 0);
 #ifdef CONFIG_HIBERNATION
 	if (state == 4) {
 
-

To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth