diff options
Diffstat (limited to 'drivers/tty/amiserial.c')
-rw-r--r-- | drivers/tty/amiserial.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 998731f01d62..2b7535d42e05 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c | |||
@@ -1710,10 +1710,6 @@ static int __init amiga_serial_probe(struct platform_device *pdev) | |||
1710 | serial_driver->flags = TTY_DRIVER_REAL_RAW; | 1710 | serial_driver->flags = TTY_DRIVER_REAL_RAW; |
1711 | tty_set_operations(serial_driver, &serial_ops); | 1711 | tty_set_operations(serial_driver, &serial_ops); |
1712 | 1712 | ||
1713 | error = tty_register_driver(serial_driver); | ||
1714 | if (error) | ||
1715 | goto fail_put_tty_driver; | ||
1716 | |||
1717 | state = rs_table; | 1713 | state = rs_table; |
1718 | state->port = (int)&custom.serdatr; /* Just to give it a value */ | 1714 | state->port = (int)&custom.serdatr; /* Just to give it a value */ |
1719 | state->custom_divisor = 0; | 1715 | state->custom_divisor = 0; |
@@ -1724,6 +1720,11 @@ static int __init amiga_serial_probe(struct platform_device *pdev) | |||
1724 | state->icount.overrun = state->icount.brk = 0; | 1720 | state->icount.overrun = state->icount.brk = 0; |
1725 | tty_port_init(&state->tport); | 1721 | tty_port_init(&state->tport); |
1726 | state->tport.ops = &amiga_port_ops; | 1722 | state->tport.ops = &amiga_port_ops; |
1723 | tty_port_link_device(&state->tport, serial_driver, 0); | ||
1724 | |||
1725 | error = tty_register_driver(serial_driver); | ||
1726 | if (error) | ||
1727 | goto fail_put_tty_driver; | ||
1727 | 1728 | ||
1728 | printk(KERN_INFO "ttyS0 is the amiga builtin serial port\n"); | 1729 | printk(KERN_INFO "ttyS0 is the amiga builtin serial port\n"); |
1729 | 1730 | ||