diff options
Diffstat (limited to 'arch/xtensa/platforms/iss/console.c')
-rw-r--r-- | arch/xtensa/platforms/iss/console.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index 247e9d40a52e..19a802a13096 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c | |||
@@ -68,11 +68,6 @@ static void rs_poll(unsigned long); | |||
68 | 68 | ||
69 | static int rs_open(struct tty_struct *tty, struct file * filp) | 69 | static int rs_open(struct tty_struct *tty, struct file * filp) |
70 | { | 70 | { |
71 | int line = tty->index; | ||
72 | |||
73 | if ((line < 0) || (line >= SERIAL_MAX_NUM_LINES)) | ||
74 | return -ENODEV; | ||
75 | |||
76 | spin_lock(&timer_lock); | 71 | spin_lock(&timer_lock); |
77 | 72 | ||
78 | if (tty->count == 1) { | 73 | if (tty->count == 1) { |
@@ -101,6 +96,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
101 | { | 96 | { |
102 | spin_lock(&timer_lock); | 97 | spin_lock(&timer_lock); |
103 | if (tty->count == 1) | 98 | if (tty->count == 1) |
99 | /* this will cause a deadlock if the timer ticks right now */ | ||
104 | del_timer_sync(&serial_timer); | 100 | del_timer_sync(&serial_timer); |
105 | spin_unlock(&timer_lock); | 101 | spin_unlock(&timer_lock); |
106 | } | 102 | } |
@@ -210,7 +206,7 @@ static const struct tty_operations serial_ops = { | |||
210 | 206 | ||
211 | int __init rs_init(void) | 207 | int __init rs_init(void) |
212 | { | 208 | { |
213 | serial_driver = alloc_tty_driver(1); | 209 | serial_driver = alloc_tty_driver(SERIAL_MAX_NUM_LINES); |
214 | 210 | ||
215 | printk ("%s %s\n", serial_name, serial_version); | 211 | printk ("%s %s\n", serial_name, serial_version); |
216 | 212 | ||