Merge commit 'c104f1fa1ecf4ee0fc06e31b1f77630b2551be81' into stable/for-linus-3.4
[firefly-linux-kernel-4.4.55.git] / drivers / tty / rocket.c
index de88aa5566e5eeb5176ebc910b2a1d37cb055637..777d5f9cf6cc13e4d91c3ec175621aa4c16d2456 100644 (file)
@@ -892,12 +892,12 @@ static int rp_open(struct tty_struct *tty, struct file *filp)
 {
        struct r_port *info;
        struct tty_port *port;
-       int line = 0, retval;
+       int retval;
        CHANNEL_t *cp;
        unsigned long page;
 
-       line = tty->index;
-       if (line < 0 || line >= MAX_RP_PORTS || ((info = rp_table[line]) == NULL))
+       info = rp_table[tty->index];
+       if (info == NULL)
                return -ENXIO;
        port = &info->port;
        
@@ -2277,7 +2277,6 @@ static int __init rp_init(void)
         * driver with the tty layer.
         */
 
-       rocket_driver->owner = THIS_MODULE;
        rocket_driver->flags = TTY_DRIVER_DYNAMIC_DEV;
        rocket_driver->name = "ttyR";
        rocket_driver->driver_name = "Comtrol RocketPort";