diff options
Diffstat (limited to 'drivers/tty/ehv_bytechan.c')
-rw-r--r-- | drivers/tty/ehv_bytechan.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c index 4813684cb634..4ab936b7aac6 100644 --- a/drivers/tty/ehv_bytechan.c +++ b/drivers/tty/ehv_bytechan.c | |||
@@ -738,16 +738,17 @@ static int __devinit ehv_bc_tty_probe(struct platform_device *pdev) | |||
738 | goto error; | 738 | goto error; |
739 | } | 739 | } |
740 | 740 | ||
741 | bc->dev = tty_register_device(ehv_bc_driver, i, &pdev->dev); | 741 | tty_port_init(&bc->port); |
742 | bc->port.ops = &ehv_bc_tty_port_ops; | ||
743 | |||
744 | bc->dev = tty_port_register_device(&bc->port, ehv_bc_driver, i, | ||
745 | &pdev->dev); | ||
742 | if (IS_ERR(bc->dev)) { | 746 | if (IS_ERR(bc->dev)) { |
743 | ret = PTR_ERR(bc->dev); | 747 | ret = PTR_ERR(bc->dev); |
744 | dev_err(&pdev->dev, "could not register tty (ret=%i)\n", ret); | 748 | dev_err(&pdev->dev, "could not register tty (ret=%i)\n", ret); |
745 | goto error; | 749 | goto error; |
746 | } | 750 | } |
747 | 751 | ||
748 | tty_port_init(&bc->port); | ||
749 | bc->port.ops = &ehv_bc_tty_port_ops; | ||
750 | |||
751 | dev_set_drvdata(&pdev->dev, bc); | 752 | dev_set_drvdata(&pdev->dev, bc); |
752 | 753 | ||
753 | dev_info(&pdev->dev, "registered /dev/%s%u for byte channel %u\n", | 754 | dev_info(&pdev->dev, "registered /dev/%s%u for byte channel %u\n", |