patch-2.2.17 linux/drivers/s390/char/hwc_tty.c

Next file: linux/drivers/s390/net/ctc.c
Previous file: linux/drivers/s390/char/con3215.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.16/drivers/s390/char/hwc_tty.c linux/drivers/s390/char/hwc_tty.c
@@ -73,8 +73,6 @@
 	return 0;
 }
 
-#if 0
-
 static void 
 hwc_tty_close (struct tty_struct *tty,
                            struct file *filp)
@@ -84,11 +82,13 @@
 			"do not close hwc tty because of wrong device number");
 		return;
 	}
+	if (tty->count > 1)
+		return;
+
 	hwc_tty_data.tty = NULL;
 
 	hwc_unregister_calls (&(hwc_tty_data.calls));
 }
-#endif
 
 static int 
 hwc_tty_write_room (struct tty_struct *tty)
@@ -316,7 +316,7 @@
 	hwc_tty_driver.termios_locked = hwc_tty_termios_locked;
 
 	hwc_tty_driver.open = hwc_tty_open;
-	hwc_tty_driver.close = NULL /* hwc_tty_close */;
+	hwc_tty_driver.close = hwc_tty_close;
 	hwc_tty_driver.write = hwc_tty_write;
 	hwc_tty_driver.put_char = hwc_tty_put_char;
 	hwc_tty_driver.flush_chars = hwc_tty_flush_chars;

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