public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/8] New set of input patches
Date: Thu, 8 Jul 2004 01:56:03 -0500	[thread overview]
Message-ID: <200407080156.05021.dtor_core@ameritech.net> (raw)
In-Reply-To: <200407080155.38937.dtor_core@ameritech.net>


===================================================================


ChangeSet@1.1821, 2004-07-08 00:23:10-05:00, dtor_core@ameritech.net
  Input: rearrange code in sunzilog so it registers its serio ports
         only after hardware was fully initialized and with interrupts
         tuned back on, otherwise it deadlocks.
  
  Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


 sunzilog.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)


===================================================================



diff -Nru a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
--- a/drivers/serial/sunzilog.c	2004-07-08 01:34:54 -05:00
+++ b/drivers/serial/sunzilog.c	2004-07-08 01:34:54 -05:00
@@ -1529,7 +1529,6 @@
 static void __init sunzilog_init_kbdms(struct uart_sunzilog_port *up, int channel)
 {
 	int baud, brg;
-	struct serio *serio;
 
 	if (channel == KEYBOARD_LINE) {
 		up->flags |= SUNZILOG_FLAG_CONS_KEYB;
@@ -1546,8 +1545,15 @@
 	up->curregs[R15] = BRKIE;
 	brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR);
 	sunzilog_convert_to_zs(up, up->cflag, 0, brg);
+	sunzilog_set_mctrl(&up->port, TIOCM_DTR | TIOCM_RTS);
+	__sunzilog_startup(up);
+}
 
 #ifdef CONFIG_SERIO
+static void __init sunzilog_register_serio(struct uart_sunzilog_port *up, int channel)
+{
+	struct serio *serio;
+
 	up->serio = serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
 	if (serio) {
 
@@ -1576,11 +1582,8 @@
 		printk(KERN_WARNING "zs%d: not enough memory for serio port\n",
 			channel);
 	}
-#endif
-
-	sunzilog_set_mctrl(&up->port, TIOCM_DTR | TIOCM_RTS);
-	__sunzilog_startup(up);
 }
+#endif
 
 static void __init sunzilog_init_hw(void)
 {
@@ -1624,6 +1627,11 @@
 		}
 
 		spin_unlock_irqrestore(&up->port.lock, flags);
+
+#ifdef CONFIG_SERIO
+		if (i == KEYBOARD_LINE || i == MOUSE_LINE)
+			sunzilog_register_serio(up, i);
+#endif
 	}
 }
 

  reply	other threads:[~2004-07-08  7:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-08  6:55 [PATCH 0/8] New set of input patches Dmitry Torokhov
2004-07-08  6:55 ` [PATCH 1/8] " Dmitry Torokhov
2004-07-08  6:56   ` Dmitry Torokhov [this message]
2004-07-08  6:56     ` [PATCH 3/8] " Dmitry Torokhov
2004-07-08  6:57       ` [PATCH 4/8] " Dmitry Torokhov
2004-07-08  6:57         ` [PATCH 5/8] " Dmitry Torokhov
2004-07-08  6:58           ` [PATCH 6/8] " Dmitry Torokhov
2004-07-08  6:58             ` [PATCH 7/8] " Dmitry Torokhov
2004-07-08  6:59               ` [PATCH 8/8] " Dmitry Torokhov
2004-07-12  3:17   ` synaptics driver Ari Pollak
2004-07-12  3:41     ` Dmitry Torokhov
2004-07-08 20:32 ` [PATCH 0/8] New set of input patches Pavel Machek
2004-07-09  3:48   ` Dmitry Torokhov
2004-07-09  5:06     ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200407080156.05021.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox