nfsd: move most of nfsfh.h to fs/nfsd
[safe/jmp/linux-2.6] / drivers / char / moxa.c
index 6799588..dd0083b 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
 #include <linux/major.h>
+#include <linux/smp_lock.h>
 #include <linux/string.h>
 #include <linux/fcntl.h>
 #include <linux/ptrace.h>
@@ -1189,11 +1190,6 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
                return -ENODEV;
        }
 
-       if (port % MAX_PORTS_PER_BOARD >= brd->numPorts) {
-               retval = -ENODEV;
-               goto out_unlock;
-       }
-
        ch = &brd->ports[port % MAX_PORTS_PER_BOARD];
        ch->port.count++;
        tty->driver_data = ch;
@@ -1218,8 +1214,8 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
                                moxa_close_port(tty);
        } else
                ch->port.flags |= ASYNC_NORMAL_ACTIVE;
-out_unlock:
        mutex_unlock(&moxa_openlock);
+
        return retval;
 }