diff options
Diffstat (limited to 'drivers/tty/rocket.c')
-rw-r--r-- | drivers/tty/rocket.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c index de88aa5566e5..777d5f9cf6cc 100644 --- a/drivers/tty/rocket.c +++ b/drivers/tty/rocket.c @@ -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"; |