tty: Introduce a tty_port generic block_til_ready

Previous thread: tty: relock the mxser driver by Linux Kernel Mailing List on Friday, January 2, 2009 - 1:00 pm. (1 message)

Next thread: tty: Rework istallion to use the tty port changes by Linux Kernel Mailing List on Friday, January 2, 2009 - 1:00 pm. (1 message)
From: Linux Kernel Mailing List
Date: Friday, January 2, 2009 - 1:00 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=36c621...
Commit:     36c621d82b956ff6ff72273f848af53e6c581aba
Parent:     3b6826b250633361f08a6427a4ac0035e5d88c72
Author:     Alan Cox <alan@redhat.com>
AuthorDate: Fri Jan 2 13:46:10 2009 +0000
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Fri Jan 2 10:19:39 2009 -0800

    tty: Introduce a tty_port generic block_til_ready
    
    Start sucking more commonality out of the drivers into a single piece of
    core code.
    
    Signed-off-by: Alan Cox <alan@redhat.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 drivers/char/isicom.c   |   79 +----------------------------------
 drivers/char/mxser.c    |   71 +-------------------------------
 drivers/char/riscom8.c  |   86 +--------------------------------------
 drivers/char/synclink.c |    1 +
 drivers/char/tty_port.c |  105 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/char/vme_scc.c  |    6 +-
 include/linux/tty.h     |    2 +
 7 files changed, 115 insertions(+), 235 deletions(-)

diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index db53db9..bac55cf 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -838,82 +838,6 @@ static int isicom_carrier_raised(struct tty_port *port)
 	return (ip->status & ISI_DCD)?1 : 0;
 }
 
-static int block_til_ready(struct tty_struct *tty, struct file *filp,
-	struct isi_port *ip)
-{
-	struct tty_port *port = &ip->port;
-	int do_clocal = 0, retval;
-	unsigned long flags;
-	DECLARE_WAITQUEUE(wait, current);
-	int cd;
-
-	/* block if port is in the process of being closed */
-
-	if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
-		pr_dbg("block_til_ready: close in progress.\n");
-		interruptible_sleep_on(&port->close_wait);
-		if (port->flags & ASYNC_HUP_NOTIFY)
-			return -EAGAIN;
-		else
-			return -ERESTARTSYS;
-	}
-
-	/* if non-blocking mode is set ... ...
Previous thread: tty: relock the mxser driver by Linux Kernel Mailing List on Friday, January 2, 2009 - 1:00 pm. (1 message)

Next thread: tty: Rework istallion to use the tty port changes by Linux Kernel Mailing List on Friday, January 2, 2009 - 1:00 pm. (1 message)