Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43665
b: refs/heads/master
c: 214efeb
h: refs/heads/master
i:
  43663: 8e61470
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Dec 8, 2006
1 parent 18366d3 commit bc481b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e8bcf9add02176be7e052b1f0675f7a462eaf3d
refs/heads/master: 214efebba86260a0fb3ef84b9f5707b58cbc227b
15 changes: 8 additions & 7 deletions trunk/drivers/char/mxser_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ static int mxser_block_til_ready(struct tty_struct *tty, struct file *filp,
* If non-blocking mode is set, or the port is not enabled,
* then make the check up front and then exit.
*/
if ((filp->f_flags & O_NONBLOCK) || (tty->flags & (1 << TTY_IO_ERROR))) {
if ((filp->f_flags & O_NONBLOCK) ||
test_bit(TTY_IO_ERROR, &tty->flags)) {
port->flags |= ASYNC_NORMAL_ACTIVE;
return 0;
}
Expand Down Expand Up @@ -1437,7 +1438,7 @@ static int mxser_tiocmget(struct tty_struct *tty, struct file *file)

if (tty->index == MXSER_PORTS)
return -ENOIOCTLCMD;
if (tty->flags & (1 << TTY_IO_ERROR))
if (test_bit(TTY_IO_ERROR, &tty->flags))
return -EIO;

control = info->MCR;
Expand All @@ -1464,7 +1465,7 @@ static int mxser_tiocmset(struct tty_struct *tty, struct file *file,

if (tty->index == MXSER_PORTS)
return -ENOIOCTLCMD;
if (tty->flags & (1 << TTY_IO_ERROR))
if (test_bit(TTY_IO_ERROR, &tty->flags))
return -EIO;

spin_lock_irqsave(&info->slock, flags);
Expand Down Expand Up @@ -1798,10 +1799,10 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
}
/* above add by Victor Yu. 01-05-2004 */

if ((cmd != TIOCGSERIAL) && (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
if (tty->flags & (1 << TTY_IO_ERROR))
return -EIO;
}
if (cmd != TIOCGSERIAL && cmd != TIOCMIWAIT && cmd != TIOCGICOUNT &&
test_bit(TTY_IO_ERROR, &tty->flags))
return -EIO;

switch (cmd) {
case TCSBRK: /* SVID version: non-zero arg --> no break */
retval = tty_check_change(tty);
Expand Down

0 comments on commit bc481b3

Please sign in to comment.