aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc/hvsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/hvc/hvsi.c')
-rw-r--r--drivers/tty/hvc/hvsi.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c
index cdfa3e02d627..a7488b748647 100644
--- a/drivers/tty/hvc/hvsi.c
+++ b/drivers/tty/hvc/hvsi.c
@@ -737,14 +737,11 @@ static int hvsi_open(struct tty_struct *tty, struct file *filp)
737{ 737{
738 struct hvsi_struct *hp; 738 struct hvsi_struct *hp;
739 unsigned long flags; 739 unsigned long flags;
740 int line = tty->index;
741 int ret; 740 int ret;
742 741
743 pr_debug("%s\n", __func__); 742 pr_debug("%s\n", __func__);
744 743
745 if (line < 0 || line >= hvsi_count) 744 hp = &hvsi_ports[tty->index];
746 return -ENODEV;
747 hp = &hvsi_ports[line];
748 745
749 tty->driver_data = hp; 746 tty->driver_data = hp;
750 747
@@ -1088,7 +1085,6 @@ static int __init hvsi_init(void)
1088 if (!hvsi_driver) 1085 if (!hvsi_driver)
1089 return -ENOMEM; 1086 return -ENOMEM;
1090 1087
1091 hvsi_driver->owner = THIS_MODULE;
1092 hvsi_driver->driver_name = "hvsi"; 1088 hvsi_driver->driver_name = "hvsi";
1093 hvsi_driver->name = "hvsi"; 1089 hvsi_driver->name = "hvsi";
1094 hvsi_driver->major = HVSI_MAJOR; 1090 hvsi_driver->major = HVSI_MAJOR;
@@ -1237,7 +1233,7 @@ static int __init hvsi_console_init(void)
1237 hp->state = HVSI_CLOSED; 1233 hp->state = HVSI_CLOSED;
1238 hp->vtermno = *vtermno; 1234 hp->vtermno = *vtermno;
1239 hp->virq = irq_create_mapping(NULL, irq[0]); 1235 hp->virq = irq_create_mapping(NULL, irq[0]);
1240 if (hp->virq == NO_IRQ) { 1236 if (hp->virq == 0) {
1241 printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n", 1237 printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n",
1242 __func__, irq[0]); 1238 __func__, irq[0]);
1243 continue; 1239 continue;