aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/amiserial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/amiserial.c')
-rw-r--r--drivers/tty/amiserial.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index b42f00d987ae..753286257554 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -1768,13 +1768,9 @@ static int get_async_struct(int line, struct async_struct **ret_info)
1768static int rs_open(struct tty_struct *tty, struct file * filp) 1768static int rs_open(struct tty_struct *tty, struct file * filp)
1769{ 1769{
1770 struct async_struct *info; 1770 struct async_struct *info;
1771 int retval, line; 1771 int retval;
1772 1772
1773 line = tty->index; 1773 retval = get_async_struct(tty->index, &info);
1774 if ((line < 0) || (line >= NR_PORTS)) {
1775 return -ENODEV;
1776 }
1777 retval = get_async_struct(line, &info);
1778 if (retval) { 1774 if (retval) {
1779 return retval; 1775 return retval;
1780 } 1776 }
@@ -1964,7 +1960,7 @@ static int __init amiga_serial_probe(struct platform_device *pdev)
1964 struct serial_state * state; 1960 struct serial_state * state;
1965 int error; 1961 int error;
1966 1962
1967 serial_driver = alloc_tty_driver(1); 1963 serial_driver = alloc_tty_driver(NR_PORTS);
1968 if (!serial_driver) 1964 if (!serial_driver)
1969 return -ENOMEM; 1965 return -ENOMEM;
1970 1966