aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-02-10 04:44:55 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:26 -0500
commitb963a8441cb95999c97bea379607071a869c65f0 (patch)
tree111fa0624be52ba830902fac3777febf340cf5e8 /drivers/usb/serial
parent1ed0c0b7306d7c93e83ebe30087a12684b280cdc (diff)
[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 <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/digi_acceleport.c10
-rw-r--r--drivers/usb/serial/keyspan_pda.c7
-rw-r--r--drivers/usb/serial/mos7720.c14
-rw-r--r--drivers/usb/serial/mos7840.c14
4 files changed, 6 insertions, 39 deletions
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index 0b0fb51bad3e..d78692c01cfa 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)
616 616
617static void digi_wakeup_write( struct usb_serial_port *port ) 617static void digi_wakeup_write( struct usb_serial_port *port )
618{ 618{
619 619 tty_wakeup(port->tty);
620 struct tty_struct *tty = port->tty;
621
622
623 /* wake up port processes */
624 wake_up_interruptible( &port->write_wait );
625
626 /* wake up line discipline */
627 tty_wakeup(tty);
628} 620}
629 621
630 622
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index da514cb785b3..dd0b66a6ed5d 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)
182 struct keyspan_pda_private *priv = 182 struct keyspan_pda_private *priv =
183 container_of(work, struct keyspan_pda_private, wakeup_work); 183 container_of(work, struct keyspan_pda_private, wakeup_work);
184 struct usb_serial_port *port = priv->port; 184 struct usb_serial_port *port = priv->port;
185 struct tty_struct *tty = port->tty;
186 185
187 /* wake up port processes */ 186 tty_wakeup(port->tty);
188 wake_up_interruptible( &port->write_wait );
189
190 /* wake up line discipline */
191 tty_wakeup(tty);
192} 187}
193 188
194static void keyspan_pda_request_unthrottle(struct work_struct *work) 189static void keyspan_pda_request_unthrottle(struct work_struct *work)
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 6109c6704a73..2d588fb82573 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)
269 269
270 tty = mos7720_port->port->tty; 270 tty = mos7720_port->port->tty;
271 271
272 if (tty && mos7720_port->open) { 272 if (tty && mos7720_port->open)
273 /* let the tty driver wakeup if it has a special * 273 tty_wakeup(tty);
274 * write_wakeup function */
275 if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
276 tty->ldisc.write_wakeup)
277 (tty->ldisc.write_wakeup)(tty);
278
279 /* tell the tty driver that something has changed */
280 wake_up_interruptible(&tty->write_wait);
281 }
282
283 /* schedule_work(&mos7720_port->port->work); */
284} 274}
285 275
286/* 276/*
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index b2264a87617b..c6cca859af45 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)
755 755
756 tty = mos7840_port->port->tty; 756 tty = mos7840_port->port->tty;
757 757
758 if (tty && mos7840_port->open) { 758 if (tty && mos7840_port->open)
759 /* let the tty driver wakeup if it has a special * 759 tty_wakeup(tty);
760 * write_wakeup function */
761
762 if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP))
763 && tty->ldisc.write_wakeup) {
764 (tty->ldisc.write_wakeup) (tty);
765 }
766
767 /* tell the tty driver that something has changed */
768 wake_up_interruptible(&tty->write_wait);
769 }
770 760
771} 761}
772 762