* [PATCH 1/6] Char: mxser_new, eliminate tty ldisc deref
@ 2006-10-06 23:01 Jiri Slaby
0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2006-10-06 23:01 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, support, Alan Cox
mxser_new, eliminate tty ldisc deref
Use tty_ldisc_flush and tty_wakeup helpers for accessing ldisc internals.
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit f1ec019ded64c90bc2c8017a41bd77c8f900711c
tree 2c0916affadc7d056cd8ce397109a3f85bfc4c1f
parent b886c49c87ee91a038b917f6933183db8ae58125
author Jiri Slaby <jirislaby@gmail.com> Fri, 06 Oct 2006 23:14:52 +0200
committer Jiri Slaby <xslaby@anemoi.localdomain> 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);
}
/*
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-06 23:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-06 23:01 [PATCH 1/6] Char: mxser_new, eliminate tty ldisc deref Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox