patch-2.2.4 linux/drivers/sbus/char/sunkbd.c

Next file: linux/drivers/sbus/char/sunserial.c
Previous file: linux/drivers/sbus/char/su.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.3/linux/drivers/sbus/char/sunkbd.c linux/drivers/sbus/char/sunkbd.c
@@ -514,8 +514,13 @@
 	mark_bh(CONSOLE_BH);
 	add_keyboard_randomness(keycode);
 
+	tty = ttytab? ttytab[fg_console]: NULL;
+	if (tty && (!tty->driver_data)) {
+		/* This is to workaround ugly bug in tty_io.c, which
+                   does not do locking when it should */
+		tty = NULL;
+	}
 	kbd = kbd_table + fg_console;
-	tty = ttytab[fg_console];
 	if((raw_mode = (kbd->kbdmode == VC_RAW))) {
 		if (kbd_redirected == fg_console+1)
 			push_kbd (keycode);

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