[PATCH 1/6] Char: mxser_new, eliminate tty ldisc deref

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mxser_new, eliminate tty ldisc deref

Use tty_ldisc_flush and tty_wakeup helpers for accessing ldisc internals.

Cc: Alan Cox <[email protected]>
Signed-off-by: Jiri Slaby <[email protected]>

---
commit f1ec019ded64c90bc2c8017a41bd77c8f900711c
tree 2c0916affadc7d056cd8ce397109a3f85bfc4c1f
parent b886c49c87ee91a038b917f6933183db8ae58125
author Jiri Slaby <[email protected]> Fri, 06 Oct 2006 23:14:52 +0200
committer Jiri Slaby <[email protected]> Fri, 06 Oct 2006 23:14:52 +0200

 drivers/char/mxser_new.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index a555dda..1f53e07 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -1065,7 +1065,6 @@ static void mxser_close(struct tty_struc
 
 	unsigned long timeout;
 	unsigned long flags;
-	struct tty_ldisc *ld;
 
 	if (tty->index == MXSER_PORTS)
 		return;
@@ -1145,12 +1144,7 @@ static void mxser_close(struct tty_struc
 	if (tty->driver->flush_buffer)
 		tty->driver->flush_buffer(tty);
 
-	ld = tty_ldisc_ref(tty);
-	if (ld) {
-		if (ld->flush_buffer)
-			ld->flush_buffer(tty);
-		tty_ldisc_deref(ld);
-	}
+	tty_ldisc_flush(tty);
 
 	tty->closing = 0;
 	info->event = 0;
@@ -1303,9 +1297,7 @@ static void mxser_flush_buffer(struct tt
 	spin_unlock_irqrestore(&info->slock, flags);
 	/* above added by shinhay */
 
-	wake_up_interruptible(&tty->write_wait);
-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
-		(tty->ldisc.write_wakeup) (tty);
+	tty_wakeup(tty);
 }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux