]> err.no Git - linux-2.6/blobdiff - drivers/char/rio/riointr.c
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer...
[linux-2.6] / drivers / char / rio / riointr.c
index eeda40c5e189067a547e1db2a5670a6756fc5a74..ea21686c69a43293b41664546b134932e3837ca9 100644 (file)
@@ -42,7 +42,6 @@ static char *_riointr_c_sccs_ = "@(#)riointr.c        1.2";
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/string.h>
-#include <asm/semaphore.h>
 #include <asm/uaccess.h>
 
 #include <linux/termios.h>
@@ -162,13 +161,8 @@ void RIOTxEnable(char *en)
 
        rio_spin_unlock_irqrestore(&PortP->portSem, flags);
 
-       if (PortP->gs.xmit_cnt <= (PortP->gs.wakeup_chars + 2 * PKT_MAX_DATA_LEN)) {
-               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);
-               if ((PortP->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && PortP->gs.tty->ldisc.write_wakeup)
-                       (PortP->gs.tty->ldisc.write_wakeup) (PortP->gs.tty);
-               rio_dprintk(RIO_DEBUG_INTR, "(%d/%d)\n", PortP->gs.wakeup_chars, PortP->gs.xmit_cnt);
-               wake_up_interruptible(&PortP->gs.tty->write_wait);
-       }
+       if (PortP->gs.xmit_cnt <= (PortP->gs.wakeup_chars + 2 * PKT_MAX_DATA_LEN))
+               tty_wakeup(PortP->gs.tty);
 
 }
 
@@ -407,9 +401,8 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP)
                                        PortP->InUse = NOT_INUSE;
 
                                        rio_spin_unlock(&PortP->portSem);
-                                       if (RIOParam(PortP, OPEN, ((PortP->Cor2Copy & (COR2_RTSFLOW | COR2_CTSFLOW)) == (COR2_RTSFLOW | COR2_CTSFLOW)) ? 1 : 0, DONT_SLEEP) == RIO_FAIL) {
+                                       if (RIOParam(PortP, RIOC_OPEN, ((PortP->Cor2Copy & (RIOC_COR2_RTSFLOW | RIOC_COR2_CTSFLOW)) == (RIOC_COR2_RTSFLOW | RIOC_COR2_CTSFLOW)) ? 1 : 0, DONT_SLEEP) == RIO_FAIL)
                                                continue;       /* with next port */
-                                       }
                                        rio_spin_lock(&PortP->portSem);
                                        PortP->MagicFlags &= ~MAGIC_REBOOT;
                                }
@@ -435,7 +428,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP)
                                         */
                                        PktCmdP = (struct PktCmd __iomem *) &PacketP->data[0];
 
-                                       writeb(WFLUSH, &PktCmdP->Command);
+                                       writeb(RIOC_WFLUSH, &PktCmdP->Command);
 
                                        p = PortP->HostPort % (u16) PORTS_PER_RTA;