patch-2.3.49 linux/arch/i386/kernel/acpi.c

Next file: linux/arch/i386/kernel/i8259.c
Previous file: linux/arch/i386/kernel/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.48/linux/arch/i386/kernel/acpi.c linux/arch/i386/kernel/acpi.c
@@ -977,11 +977,9 @@
 		typa = ((typa << ACPI_SLP_TYP_SHIFT) & ACPI_SLP_TYP_MASK);
 		typb = ((typb << ACPI_SLP_TYP_SHIFT) & ACPI_SLP_TYP_MASK);
 
-		if (state != ACPI_S0) {
-			acpi_sleep_start = get_cmos_time();
-			acpi_enter_dx(ACPI_D3);
-			acpi_sleep_state = state;
-		}
+		acpi_sleep_start = get_cmos_time();
+		acpi_enter_dx(ACPI_D3);
+		acpi_sleep_state = state;
 
 		// clear wake status
 		acpi_write_pm1_status(acpi_facp, ACPI_WAK);
@@ -996,17 +994,11 @@
 			outw(value | typb | ACPI_SLP_EN, acpi_facp->pm1b_cnt);
 		}
 
-		if (state == ACPI_S0) {
-			acpi_sleep_state = state;
-			acpi_enter_dx(ACPI_D0);
-			acpi_sleep_start = 0;
-		}
-		else if (state == ACPI_S1) {
-			// wait until S1 is entered
-			while (!(acpi_read_pm1_status(acpi_facp) & ACPI_WAK)) ;
-			// finished sleeping, update system time
-			acpi_update_clock();
-		}
+		// wait until S1 is entered
+		while (!(acpi_read_pm1_status(acpi_facp) & ACPI_WAK)) ;
+		// finished sleeping, update system time
+		acpi_update_clock();
+		acpi_enter_dx(ACPI_D0);
 	}
 }
 
@@ -1292,7 +1284,6 @@
 	{
 #ifdef CONFIG_ACPI_S1_SLEEP
 		acpi_enter_sx(ACPI_S1);
-		acpi_enter_sx(ACPI_S0);
 #endif
 	}
 	file->f_pos += *len;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)