From b963a8441cb95999c97bea379607071a869c65f0 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Sat, 10 Feb 2007 01:44:55 -0800 Subject: [PATCH] Char: tty_wakeup cleanup tty_wakeup cleanup - remove wake_up_interruptible(&tty->write_wait) surrounding tty_wakup(tty); - substitute tty->ldisc.write_wakeup(tty) + wake_up() by tty_wakeup(tty); Signed-off-by: Jiri Slaby Cc: Alan Cox Acked-by: Tilman Schmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/usb/serial/digi_acceleport.c | 10 +--------- drivers/usb/serial/keyspan_pda.c | 7 +------ drivers/usb/serial/mos7720.c | 14 ++------------ drivers/usb/serial/mos7840.c | 14 ++------------ 4 files changed, 6 insertions(+), 39 deletions(-) (limited to 'drivers/usb/serial') diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 0b0fb51bad3..d78692c01cf 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@ -616,15 +616,7 @@ static void digi_wakeup_write_lock(struct work_struct *work) static void digi_wakeup_write( struct usb_serial_port *port ) { - - struct tty_struct *tty = port->tty; - - - /* wake up port processes */ - wake_up_interruptible( &port->write_wait ); - - /* wake up line discipline */ - tty_wakeup(tty); + tty_wakeup(port->tty); } diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index da514cb785b..dd0b66a6ed5 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -182,13 +182,8 @@ static void keyspan_pda_wakeup_write(struct work_struct *work) struct keyspan_pda_private *priv = container_of(work, struct keyspan_pda_private, wakeup_work); struct usb_serial_port *port = priv->port; - struct tty_struct *tty = port->tty; - /* wake up port processes */ - wake_up_interruptible( &port->write_wait ); - - /* wake up line discipline */ - tty_wakeup(tty); + tty_wakeup(port->tty); } static void keyspan_pda_request_unthrottle(struct work_struct *work) diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 6109c6704a7..2d588fb8257 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -269,18 +269,8 @@ static void mos7720_bulk_out_data_callback(struct urb *urb) tty = mos7720_port->port->tty; - if (tty && mos7720_port->open) { - /* let the tty driver wakeup if it has a special * - * write_wakeup function */ - if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && - tty->ldisc.write_wakeup) - (tty->ldisc.write_wakeup)(tty); - - /* tell the tty driver that something has changed */ - wake_up_interruptible(&tty->write_wait); - } - - /* schedule_work(&mos7720_port->port->work); */ + if (tty && mos7720_port->open) + tty_wakeup(tty); } /* diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index b2264a87617..c6cca859af4 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -755,18 +755,8 @@ static void mos7840_bulk_out_data_callback(struct urb *urb) tty = mos7840_port->port->tty; - if (tty && mos7840_port->open) { - /* let the tty driver wakeup if it has a special * - * write_wakeup function */ - - if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) - && tty->ldisc.write_wakeup) { - (tty->ldisc.write_wakeup) (tty); - } - - /* tell the tty driver that something has changed */ - wake_up_interruptible(&tty->write_wait); - } + if (tty && mos7840_port->open) + tty_wakeup(tty); } -- cgit v1.2.3