patch-2.3.34 linux/drivers/char/console.c

Next file: linux/drivers/char/i2c-old.c
Previous file: linux/drivers/char/buz.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.33/linux/drivers/char/console.c linux/drivers/char/console.c
@@ -91,9 +91,6 @@
 #include <linux/config.h>
 #include <linux/version.h>
 #include <linux/tqueue.h>
-#ifdef CONFIG_APM
-#include <linux/apm_bios.h>
-#endif
 #include <linux/bootmem.h>
 #include <linux/acpi.h>
 
@@ -190,6 +187,12 @@
 static int scrollback_delta = 0;
 
 /*
+ * Hook so that the power management routines can (un)blank
+ * the console on our behalf.
+ */
+int (*console_blank_hook)(int) = NULL;
+
+/*
  *	Low-Level Functions
  */
 
@@ -2551,10 +2554,8 @@
 	if (i)
 		set_origin(currcons);
 
-#ifdef CONFIG_APM
-	if (apm_display_blank())
+	if (console_blank_hook && console_blank_hook(1))
 		return;
-#endif
     	if (vesa_blank_mode)
 		sw->con_blank(vc_cons[currcons].d, vesa_blank_mode + 1);
 }
@@ -2578,9 +2579,8 @@
 
 	currcons = fg_console;
 	console_blanked = 0;
-#ifdef CONFIG_APM
-	apm_display_unblank();
-#endif
+	if (console_blank_hook)
+		console_blank_hook(0);
 	if (sw->con_blank(vc_cons[currcons].d, 0))
 		/* Low-level driver cannot restore -> do it ourselves */
 		update_screen(fg_console);

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