patch-2.2.13 linux/arch/i386/kernel/apm.c

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

diff -u --recursive --new-file v2.2.12/linux/arch/i386/kernel/apm.c linux/arch/i386/kernel/apm.c
@@ -289,7 +289,7 @@
 /*
  * Local variables
  */
-static asmlinkage struct {
+static struct {
 	unsigned long	offset;
 	unsigned short	segment;
 }				apm_bios_entry;
@@ -389,6 +389,7 @@
 	{ APM_RESUME_DISABLED,	"Resume timer disabled" },
 	{ APM_BAD_STATE,	"Unable to enter requested state" },
 /* N/A	{ APM_NO_EVENTS,	"No events pending" }, */
+	{ APM_NO_ERROR,		"BIOS did not set a return code" },
 	{ APM_NOT_PRESENT,	"No APM present" }
 };
 #define ERROR_COUNT	(sizeof(error_table)/sizeof(lookup_t))
@@ -660,7 +661,7 @@
 	if (!apm_enabled)
 		return 0;
 	error = apm_set_display_power_state(APM_STATE_STANDBY);
-	if (error == APM_SUCCESS)
+	if ((error == APM_SUCCESS) || (error == APM_NO_ERROR))
 		return 1;
 	apm_error("set display standby", error);
 #endif
@@ -676,7 +677,7 @@
 	if (!apm_enabled)
 		return 0;
 	error = apm_set_display_power_state(APM_STATE_READY);
-	if (error == APM_SUCCESS)
+	if ((error == APM_SUCCESS) || (error == APM_NO_ERROR))
 		return 1;
 	apm_error("set display ready", error);
 #endif
@@ -791,7 +792,7 @@
 #endif
 
 	err = apm_set_power_state(APM_STATE_SUSPEND);
-	if (err)
+	if ((err != APM_SUCCESS) && (err != APM_NO_ERROR))
 		apm_error("suspend", err);
 #ifdef INIT_TIMER_AFTER_SUSPEND
 	save_flags(flags);
@@ -813,7 +814,7 @@
 	int	err;
 
 	err = apm_set_power_state(APM_STATE_STANDBY);
-	if (err)
+	if ((err != APM_SUCCESS) && (err != APM_NO_ERROR))
 		apm_error("standby", err);
 }
 

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