Char: mxser_new, eliminate tty ldisc deref
Subsystems (2)
PATCH 1/6 Char: mxser_new, eliminate tty ldisc deref
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(-)
drivers/char/mxser_new.c +2 -10
@@ -1065,7 +1065,6 @@ static void mxser_close(struct tty_strucunsigned 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_strucif (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 ttspin_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); }/*