aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/amiserial.c5
-rw-r--r--drivers/char/cyclades.c1
-rw-r--r--drivers/char/epca.c3
-rw-r--r--drivers/char/generic_serial.c1
-rw-r--r--drivers/char/ip2/i2lib.c10
-rw-r--r--drivers/char/isicom.c1
-rw-r--r--drivers/char/istallion.c1
-rw-r--r--drivers/char/mxser.c4
-rw-r--r--drivers/char/pcmcia/synclink_cs.c4
-rw-r--r--drivers/char/rio/riointr.c9
-rw-r--r--drivers/char/riscom8.c5
-rw-r--r--drivers/char/rocket.c3
-rw-r--r--drivers/char/specialix.c4
-rw-r--r--drivers/char/synclink.c5
-rw-r--r--drivers/char/synclink_gt.c5
-rw-r--r--drivers/char/synclinkmp.c5
-rw-r--r--drivers/isdn/gigaset/interface.c14
-rw-r--r--drivers/isdn/i4l/isdn_tty.c1
-rw-r--r--drivers/serial/crisv10.c14
-rw-r--r--drivers/tc/zs.c4
-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
24 files changed, 23 insertions, 121 deletions
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c
index feb4ac802a0d..39880eb58f35 100644
--- a/drivers/char/amiserial.c
+++ b/drivers/char/amiserial.c
@@ -527,10 +527,8 @@ static void do_softint(unsigned long private_)
527 if (!tty) 527 if (!tty)
528 return; 528 return;
529 529
530 if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) { 530 if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event))
531 tty_wakeup(tty); 531 tty_wakeup(tty);
532 wake_up_interruptible(&tty->write_wait);
533 }
534} 532}
535 533
536/* 534/*
@@ -968,7 +966,6 @@ static void rs_flush_buffer(struct tty_struct *tty)
968 local_irq_save(flags); 966 local_irq_save(flags);
969 info->xmit.head = info->xmit.tail = 0; 967 info->xmit.head = info->xmit.tail = 0;
970 local_irq_restore(flags); 968 local_irq_restore(flags);
971 wake_up_interruptible(&tty->write_wait);
972 tty_wakeup(tty); 969 tty_wakeup(tty);
973} 970}
974 971
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 3ffa0807754c..363beb165729 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -4488,7 +4488,6 @@ static void cy_flush_buffer(struct tty_struct *tty)
4488 CY_UNLOCK(info, flags); 4488 CY_UNLOCK(info, flags);
4489 } 4489 }
4490 tty_wakeup(tty); 4490 tty_wakeup(tty);
4491 wake_up_interruptible(&tty->write_wait);
4492} /* cy_flush_buffer */ 4491} /* cy_flush_buffer */
4493 4492
4494/* 4493/*
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index a0f822c9d74d..88fc24fc4392 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -844,7 +844,6 @@ static void pc_flush_buffer(struct tty_struct *tty)
844 fepcmd(ch, STOUT, (unsigned) tail, 0, 0, 0); 844 fepcmd(ch, STOUT, (unsigned) tail, 0, 0, 0);
845 memoff(ch); 845 memoff(ch);
846 spin_unlock_irqrestore(&epca_lock, flags); 846 spin_unlock_irqrestore(&epca_lock, flags);
847 wake_up_interruptible(&tty->write_wait);
848 tty_wakeup(tty); 847 tty_wakeup(tty);
849} /* End pc_flush_buffer */ 848} /* End pc_flush_buffer */
850 849
@@ -1795,7 +1794,6 @@ static void doevent(int crd)
1795 { /* Begin if LOWWAIT */ 1794 { /* Begin if LOWWAIT */
1796 ch->statusflags &= ~LOWWAIT; 1795 ch->statusflags &= ~LOWWAIT;
1797 tty_wakeup(tty); 1796 tty_wakeup(tty);
1798 wake_up_interruptible(&tty->write_wait);
1799 } /* End if LOWWAIT */ 1797 } /* End if LOWWAIT */
1800 } else if (event & EMPTYTX_IND) { /* Begin EMPTYTX_IND */ 1798 } else if (event & EMPTYTX_IND) { /* Begin EMPTYTX_IND */
1801 /* This event is generated by setup_empty_event */ 1799 /* This event is generated by setup_empty_event */
@@ -1803,7 +1801,6 @@ static void doevent(int crd)
1803 if (ch->statusflags & EMPTYWAIT) { /* Begin if EMPTYWAIT */ 1801 if (ch->statusflags & EMPTYWAIT) { /* Begin if EMPTYWAIT */
1804 ch->statusflags &= ~EMPTYWAIT; 1802 ch->statusflags &= ~EMPTYWAIT;
1805 tty_wakeup(tty); 1803 tty_wakeup(tty);
1806 wake_up_interruptible(&tty->write_wait);
1807 } /* End if EMPTYWAIT */ 1804 } /* End if EMPTYWAIT */
1808 } /* End EMPTYTX_IND */ 1805 } /* End EMPTYTX_IND */
1809 } /* End if valid tty */ 1806 } /* End if valid tty */
diff --git a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c
index e769811e7417..337bbcdcf13d 100644
--- a/drivers/char/generic_serial.c
+++ b/drivers/char/generic_serial.c
@@ -382,7 +382,6 @@ void gs_flush_buffer(struct tty_struct *tty)
382 port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; 382 port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
383 spin_unlock_irqrestore (&port->driver_lock, flags); 383 spin_unlock_irqrestore (&port->driver_lock, flags);
384 384
385 wake_up_interruptible(&tty->write_wait);
386 tty_wakeup(tty); 385 tty_wakeup(tty);
387 func_exit (); 386 func_exit ();
388} 387}
diff --git a/drivers/char/ip2/i2lib.c b/drivers/char/ip2/i2lib.c
index 78045767ec33..88b9d338da53 100644
--- a/drivers/char/ip2/i2lib.c
+++ b/drivers/char/ip2/i2lib.c
@@ -1373,15 +1373,7 @@ ip2_owake( PTTY tp)
1373 ip2trace (CHANN, ITRC_SICMD, 10, 2, tp->flags, 1373 ip2trace (CHANN, ITRC_SICMD, 10, 2, tp->flags,
1374 (1 << TTY_DO_WRITE_WAKEUP) ); 1374 (1 << TTY_DO_WRITE_WAKEUP) );
1375 1375
1376 wake_up_interruptible ( &tp->write_wait ); 1376 tty_wakeup(tp);
1377 if ( ( tp->flags & (1 << TTY_DO_WRITE_WAKEUP) )
1378 && tp->ldisc.write_wakeup )
1379 {
1380 (tp->ldisc.write_wakeup) ( tp );
1381
1382 ip2trace (CHANN, ITRC_SICMD, 11, 0 );
1383
1384 }
1385} 1377}
1386 1378
1387static inline void 1379static inline void
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 9feb76210534..43ab9edc76f5 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -1487,7 +1487,6 @@ static void isicom_flush_buffer(struct tty_struct *tty)
1487 port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; 1487 port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
1488 spin_unlock_irqrestore(&card->card_lock, flags); 1488 spin_unlock_irqrestore(&card->card_lock, flags);
1489 1489
1490 wake_up_interruptible(&tty->write_wait);
1491 tty_wakeup(tty); 1490 tty_wakeup(tty);
1492} 1491}
1493 1492
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 68645d351873..7b279d1de4a2 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -2424,7 +2424,6 @@ static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp)
2424 if (tty != NULL) { 2424 if (tty != NULL) {
2425 tty_wakeup(tty); 2425 tty_wakeup(tty);
2426 EBRDENABLE(brdp); 2426 EBRDENABLE(brdp);
2427 wake_up_interruptible(&tty->write_wait);
2428 } 2427 }
2429 } 2428 }
2430 2429
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 83f604b19290..df1e608b7ae6 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1254,9 +1254,7 @@ static void mxser_flush_buffer(struct tty_struct *tty)
1254 spin_unlock_irqrestore(&info->slock, flags); 1254 spin_unlock_irqrestore(&info->slock, flags);
1255 /* above added by shinhay */ 1255 /* above added by shinhay */
1256 1256
1257 wake_up_interruptible(&tty->write_wait); 1257 tty_wakeup(tty);
1258 if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
1259 (tty->ldisc.write_wakeup) (tty);
1260} 1258}
1261 1259
1262static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) 1260static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index f108c136800a..4ab2c98f978c 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -887,10 +887,8 @@ static void bh_transmit(MGSLPC_INFO *info)
887 if (debug_level >= DEBUG_LEVEL_BH) 887 if (debug_level >= DEBUG_LEVEL_BH)
888 printk("bh_transmit() entry on %s\n", info->device_name); 888 printk("bh_transmit() entry on %s\n", info->device_name);
889 889
890 if (tty) { 890 if (tty)
891 tty_wakeup(tty); 891 tty_wakeup(tty);
892 wake_up_interruptible(&tty->write_wait);
893 }
894} 892}
895 893
896static void bh_status(MGSLPC_INFO *info) 894static void bh_status(MGSLPC_INFO *info)
diff --git a/drivers/char/rio/riointr.c b/drivers/char/rio/riointr.c
index eeda40c5e189..ebc76342712c 100644
--- a/drivers/char/rio/riointr.c
+++ b/drivers/char/rio/riointr.c
@@ -162,13 +162,8 @@ void RIOTxEnable(char *en)
162 162
163 rio_spin_unlock_irqrestore(&PortP->portSem, flags); 163 rio_spin_unlock_irqrestore(&PortP->portSem, flags);
164 164
165 if (PortP->gs.xmit_cnt <= (PortP->gs.wakeup_chars + 2 * PKT_MAX_DATA_LEN)) { 165 if (PortP->gs.xmit_cnt <= (PortP->gs.wakeup_chars + 2 * PKT_MAX_DATA_LEN))
166 rio_dprintk(RIO_DEBUG_INTR, "Waking up.... ldisc:%d (%d/%d)....", (int) (PortP->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)), PortP->gs.wakeup_chars, PortP->gs.xmit_cnt); 166 tty_wakeup(PortP->gs.tty);
167 if ((PortP->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && PortP->gs.tty->ldisc.write_wakeup)
168 (PortP->gs.tty->ldisc.write_wakeup) (PortP->gs.tty);
169 rio_dprintk(RIO_DEBUG_INTR, "(%d/%d)\n", PortP->gs.wakeup_chars, PortP->gs.xmit_cnt);
170 wake_up_interruptible(&PortP->gs.tty->write_wait);
171 }
172 167
173} 168}
174 169
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index e2a94bfb2a43..70145254fb9d 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -1229,7 +1229,6 @@ static void rc_flush_buffer(struct tty_struct *tty)
1229 port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; 1229 port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
1230 restore_flags(flags); 1230 restore_flags(flags);
1231 1231
1232 wake_up_interruptible(&tty->write_wait);
1233 tty_wakeup(tty); 1232 tty_wakeup(tty);
1234} 1233}
1235 1234
@@ -1570,10 +1569,8 @@ static void do_softint(struct work_struct *ugly_api)
1570 if(!(tty = port->tty)) 1569 if(!(tty = port->tty))
1571 return; 1570 return;
1572 1571
1573 if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) { 1572 if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event))
1574 tty_wakeup(tty); 1573 tty_wakeup(tty);
1575 wake_up_interruptible(&tty->write_wait);
1576 }
1577} 1574}
1578 1575
1579static const struct tty_operations riscom_ops = { 1576static const struct tty_operations riscom_ops = {
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index e94a62e30fc4..106f225e745f 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -474,7 +474,6 @@ static void rp_do_transmit(struct r_port *info)
474 474
475 if (info->xmit_cnt < WAKEUP_CHARS) { 475 if (info->xmit_cnt < WAKEUP_CHARS) {
476 tty_wakeup(tty); 476 tty_wakeup(tty);
477 wake_up_interruptible(&tty->write_wait);
478#ifdef ROCKETPORT_HAVE_POLL_WAIT 477#ifdef ROCKETPORT_HAVE_POLL_WAIT
479 wake_up_interruptible(&tty->poll_wait); 478 wake_up_interruptible(&tty->poll_wait);
480#endif 479#endif
@@ -1772,7 +1771,6 @@ static int rp_write(struct tty_struct *tty,
1772end: 1771end:
1773 if (info->xmit_cnt < WAKEUP_CHARS) { 1772 if (info->xmit_cnt < WAKEUP_CHARS) {
1774 tty_wakeup(tty); 1773 tty_wakeup(tty);
1775 wake_up_interruptible(&tty->write_wait);
1776#ifdef ROCKETPORT_HAVE_POLL_WAIT 1774#ifdef ROCKETPORT_HAVE_POLL_WAIT
1777 wake_up_interruptible(&tty->poll_wait); 1775 wake_up_interruptible(&tty->poll_wait);
1778#endif 1776#endif
@@ -1841,7 +1839,6 @@ static void rp_flush_buffer(struct tty_struct *tty)
1841 info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; 1839 info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
1842 spin_unlock_irqrestore(&info->slock, flags); 1840 spin_unlock_irqrestore(&info->slock, flags);
1843 1841
1844 wake_up_interruptible(&tty->write_wait);
1845#ifdef ROCKETPORT_HAVE_POLL_WAIT 1842#ifdef ROCKETPORT_HAVE_POLL_WAIT
1846 wake_up_interruptible(&tty->poll_wait); 1843 wake_up_interruptible(&tty->poll_wait);
1847#endif 1844#endif
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c
index 20946f5127e0..92043c8f2355 100644
--- a/drivers/char/specialix.c
+++ b/drivers/char/specialix.c
@@ -2350,10 +2350,8 @@ static void do_softint(struct work_struct *work)
2350 return; 2350 return;
2351 } 2351 }
2352 2352
2353 if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) { 2353 if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event))
2354 tty_wakeup(tty); 2354 tty_wakeup(tty);
2355 //wake_up_interruptible(&tty->write_wait);
2356 }
2357 2355
2358 func_exit(); 2356 func_exit();
2359} 2357}
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index 3fa625db9e4b..bf76db1342c5 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -1148,10 +1148,8 @@ static void mgsl_bh_transmit(struct mgsl_struct *info)
1148 printk( "%s(%d):mgsl_bh_transmit() entry on %s\n", 1148 printk( "%s(%d):mgsl_bh_transmit() entry on %s\n",
1149 __FILE__,__LINE__,info->device_name); 1149 __FILE__,__LINE__,info->device_name);
1150 1150
1151 if (tty) { 1151 if (tty)
1152 tty_wakeup(tty); 1152 tty_wakeup(tty);
1153 wake_up_interruptible(&tty->write_wait);
1154 }
1155 1153
1156 /* if transmitter idle and loopmode_send_done_requested 1154 /* if transmitter idle and loopmode_send_done_requested
1157 * then start echoing RxD to TxD 1155 * then start echoing RxD to TxD
@@ -2340,7 +2338,6 @@ static void mgsl_flush_buffer(struct tty_struct *tty)
2340 del_timer(&info->tx_timer); 2338 del_timer(&info->tx_timer);
2341 spin_unlock_irqrestore(&info->irq_spinlock,flags); 2339 spin_unlock_irqrestore(&info->irq_spinlock,flags);
2342 2340
2343 wake_up_interruptible(&tty->write_wait);
2344 tty_wakeup(tty); 2341 tty_wakeup(tty);
2345} 2342}
2346 2343
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index 792c79c315e0..54af763518fe 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -1045,7 +1045,6 @@ static void flush_buffer(struct tty_struct *tty)
1045 info->tx_count = 0; 1045 info->tx_count = 0;
1046 spin_unlock_irqrestore(&info->lock,flags); 1046 spin_unlock_irqrestore(&info->lock,flags);
1047 1047
1048 wake_up_interruptible(&tty->write_wait);
1049 tty_wakeup(tty); 1048 tty_wakeup(tty);
1050} 1049}
1051 1050
@@ -1933,10 +1932,8 @@ static void bh_transmit(struct slgt_info *info)
1933 struct tty_struct *tty = info->tty; 1932 struct tty_struct *tty = info->tty;
1934 1933
1935 DBGBH(("%s bh_transmit\n", info->device_name)); 1934 DBGBH(("%s bh_transmit\n", info->device_name));
1936 if (tty) { 1935 if (tty)
1937 tty_wakeup(tty); 1936 tty_wakeup(tty);
1938 wake_up_interruptible(&tty->write_wait);
1939 }
1940} 1937}
1941 1938
1942static void dsr_change(struct slgt_info *info) 1939static void dsr_change(struct slgt_info *info)
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index 8f4d67afe5bf..ebde4e552335 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -1258,7 +1258,6 @@ static void flush_buffer(struct tty_struct *tty)
1258 del_timer(&info->tx_timer); 1258 del_timer(&info->tx_timer);
1259 spin_unlock_irqrestore(&info->lock,flags); 1259 spin_unlock_irqrestore(&info->lock,flags);
1260 1260
1261 wake_up_interruptible(&tty->write_wait);
1262 tty_wakeup(tty); 1261 tty_wakeup(tty);
1263} 1262}
1264 1263
@@ -2127,10 +2126,8 @@ void bh_transmit(SLMP_INFO *info)
2127 printk( "%s(%d):%s bh_transmit() entry\n", 2126 printk( "%s(%d):%s bh_transmit() entry\n",
2128 __FILE__,__LINE__,info->device_name); 2127 __FILE__,__LINE__,info->device_name);
2129 2128
2130 if (tty) { 2129 if (tty)
2131 tty_wakeup(tty); 2130 tty_wakeup(tty);
2132 wake_up_interruptible(&tty->write_wait);
2133 }
2134} 2131}
2135 2132
2136void bh_status(SLMP_INFO *info) 2133void bh_status(SLMP_INFO *info)
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c
index 458b6462f937..f13de20947e0 100644
--- a/drivers/isdn/gigaset/interface.c
+++ b/drivers/isdn/gigaset/interface.c
@@ -599,19 +599,9 @@ out:
599static void if_wake(unsigned long data) 599static void if_wake(unsigned long data)
600{ 600{
601 struct cardstate *cs = (struct cardstate *) data; 601 struct cardstate *cs = (struct cardstate *) data;
602 struct tty_struct *tty;
603
604 tty = cs->tty;
605 if (!tty)
606 return;
607
608 if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
609 tty->ldisc.write_wakeup) {
610 gig_dbg(DEBUG_IF, "write wakeup call");
611 tty->ldisc.write_wakeup(tty);
612 }
613 602
614 wake_up_interruptible(&tty->write_wait); 603 if (cs->tty)
604 tty_wakeup(cs->tty);
615} 605}
616 606
617/*** interface to common ***/ 607/*** interface to common ***/
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index fc80afe555b9..ea5f30d4a5a2 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -1261,7 +1261,6 @@ isdn_tty_flush_buffer(struct tty_struct *tty)
1261 } 1261 }
1262 isdn_tty_cleanup_xmit(info); 1262 isdn_tty_cleanup_xmit(info);
1263 info->xmit_count = 0; 1263 info->xmit_count = 0;
1264 wake_up_interruptible(&tty->write_wait);
1265 tty_wakeup(tty); 1264 tty_wakeup(tty);
1266} 1265}
1267 1266
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c
index 42b050c46abe..312bef6bd583 100644
--- a/drivers/serial/crisv10.c
+++ b/drivers/serial/crisv10.c
@@ -3173,12 +3173,8 @@ do_softint(void *private_)
3173 if (!tty) 3173 if (!tty)
3174 return; 3174 return;
3175 3175
3176 if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) { 3176 if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event))
3177 if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && 3177 tty_wakeup(tty);
3178 tty->ldisc.write_wakeup)
3179 (tty->ldisc.write_wakeup)(tty);
3180 wake_up_interruptible(&tty->write_wait);
3181 }
3182} 3178}
3183 3179
3184static int 3180static int
@@ -3798,11 +3794,7 @@ rs_flush_buffer(struct tty_struct *tty)
3798 info->xmit.head = info->xmit.tail = 0; 3794 info->xmit.head = info->xmit.tail = 0;
3799 restore_flags(flags); 3795 restore_flags(flags);
3800 3796
3801 wake_up_interruptible(&tty->write_wait); 3797 tty_wakeup(tty);
3802
3803 if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
3804 tty->ldisc.write_wakeup)
3805 (tty->ldisc.write_wakeup)(tty);
3806} 3798}
3807 3799
3808/* 3800/*
diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c
index fc3197273663..3d72aa5cfc71 100644
--- a/drivers/tc/zs.c
+++ b/drivers/tc/zs.c
@@ -626,10 +626,8 @@ static void do_softint(unsigned long private_)
626 if (!tty) 626 if (!tty)
627 return; 627 return;
628 628
629 if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) { 629 if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event))
630 tty_wakeup(tty); 630 tty_wakeup(tty);
631 wake_up_interruptible(&tty->write_wait);
632 }
633} 631}
634 632
635static int zs_startup(struct dec_serial * info) 633static int zs_startup(struct dec_serial * info)
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