]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Compile fix for macserial
authorAndrew Morton <akpm@osdl.org>
Tue, 13 Apr 2004 02:25:29 +0000 (19:25 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 13 Apr 2004 02:25:29 +0000 (19:25 -0700)
From: Jeff Mahoney <jeffm@suse.com>

This patch fixes a problem with the serial conversion to tiocm[sg]et.

The paste from rs_ioctl included the command sanity checking, but there's no
command for tiocm[sg]et.  The compile ends up failing.

drivers/macintosh/macserial.c

index d5dd056d3196fbeea9f9380f4f0f10536f3c9794..2ac2b91962d24ef73ddcfb246b0b24e7206174f4 100644 (file)
@@ -1790,11 +1790,8 @@ static int rs_tiocmget(struct tty_struct *tty, struct file *file)
        if (serial_paranoia_check(info, tty->name, __FUNCTION__))
                return -ENODEV;
 
-       if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-           (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT)) {
-               if (tty->flags & (1 << TTY_IO_ERROR))
-                   return -EIO;
-       }
+       if (tty->flags & (1 << TTY_IO_ERROR))
+               return -EIO;
 
        spin_lock_irqsave(&info->lock, flags);
        control = info->curregs[5];
@@ -1820,11 +1817,8 @@ static int rs_tiocmset(struct tty_struct *tty, struct file *file,
        if (serial_paranoia_check(info, tty->name, __FUNCTION__))
                return -ENODEV;
 
-       if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-           (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT)) {
-               if (tty->flags & (1 << TTY_IO_ERROR))
-                   return -EIO;
-       }
+       if (tty->flags & (1 << TTY_IO_ERROR))
+               return -EIO;
 
        spin_lock_irqsave(&info->lock, flags);
        if (set & TIOCM_RTS)