<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Jeff Dike &lt;jdike@addtoit.com&gt;

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(&amp;tty_cdev, &amp;tty_fops);
 	if (cdev_add(&amp;tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||

_
</pre></body></html>