From: Jeff Dike <jdike@addtoit.com>

UML needs to call tty_init at a special time - make this function externally
visible and give it call-once semantics.



---

 25-akpm/drivers/char/tty_io.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff -puN drivers/char/tty_io.c~tty_io-uml-fix drivers/char/tty_io.c
--- 25/drivers/char/tty_io.c~tty_io-uml-fix	Thu Jan 15 17:59:47 2004
+++ 25-akpm/drivers/char/tty_io.c	Thu Jan 15 17:59:47 2004
@@ -2355,12 +2355,18 @@ static struct cdev ptmx_cdev;
 static struct cdev vc0_cdev;
 #endif
 
+static int tty_initialized;
+
 /*
  * Ok, now we can initialize the rest of the tty devices and can count
  * on memory allocations, interrupts etc..
  */
-static int __init tty_init(void)
+int __init tty_init(void)
 {
+        if (tty_initialized)
+                return 0;
+	tty_initialized = 1;
+
 	strcpy(tty_cdev.kobj.name, "dev.tty");
 	cdev_init(&tty_cdev, &tty_fops);
 	if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||

_