aboutsummaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-12-08 02:38:24 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 08:28:54 -0800
commit7e8bcf9add02176be7e052b1f0675f7a462eaf3d (patch)
treedc19caf11a531ef02d2aec8f92cb94dabe565ce7 /drivers/char
parent6faa3778ff69309bd3673412f0eb1e7ffee9ff83 (diff)
[PATCH] Char: 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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/mxser_new.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 8a26ce12597..71381f95556 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -1065,7 +1065,6 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
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_struct *tty, struct file *filp)
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 tty_struct *tty)
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);
}
/*