patch-2.4.23 linux-2.4.23/drivers/char/tty_io.c

Next file: linux-2.4.23/drivers/hotplug/Config.in
Previous file: linux-2.4.23/drivers/char/synclinkmp.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/drivers/char/tty_io.c linux-2.4.23/drivers/char/tty_io.c
@@ -154,6 +154,7 @@
 extern void rs285_console_init(void);
 extern void sa1100_rs_console_init(void);
 extern void sgi_serial_console_init(void);
+extern void sn_sal_serial_console_init(void);
 extern void sci_console_init(void);
 extern void dec_serial_console_init(void);
 extern void tx3912_console_init(void);
@@ -454,8 +455,6 @@
 		redirect = NULL;
 	}
 	spin_unlock(&redirect_lock);
-	if (f)
-		fput(f);
 	
 	check_tty_count(tty, "do_tty_hangup");
 	file_list_lock();
@@ -542,6 +541,8 @@
 	} else if (tty->driver.hangup)
 		(tty->driver.hangup)(tty);
 	unlock_kernel();
+	if (f)
+		fput(f);
 }
 
 void tty_hangup(struct tty_struct * tty)
@@ -1048,7 +1049,7 @@
 		}
 		o_tty->magic = 0;
 		(*o_tty->driver.refcount)--;
-		list_del(&o_tty->tty_files);
+		list_del_init(&o_tty->tty_files);
 		free_tty_struct(o_tty);
 	}
 
@@ -1060,7 +1061,7 @@
 	}
 	tty->magic = 0;
 	(*tty->driver.refcount)--;
-	list_del(&tty->tty_files);
+	list_del_init(&tty->tty_files);
 	free_tty_struct(tty);
 }
 
@@ -2391,6 +2392,12 @@
 	kbd_init();
 #endif
 
+#ifdef CONFIG_SGI_L1_SERIAL_CONSOLE
+	if (ia64_platform_is("sn2")) {
+		sn_sal_serial_console_init();
+		return; /* only one console right now for SN2 */
+	}
+#endif
 #ifdef CONFIG_ESPSERIAL  /* init ESP before rs, so rs doesn't see the port */
 	espserial_init();
 #endif

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