aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/ucc_uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/ucc_uart.c')
-rw-r--r--drivers/tty/serial/ucc_uart.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 7355303dad99..88317482b81f 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1451,7 +1451,7 @@ static int ucc_uart_probe(struct platform_device *ofdev)
1451 goto out_np; 1451 goto out_np;
1452 } 1452 }
1453 1453
1454 dev_set_drvdata(&ofdev->dev, qe_port); 1454 platform_set_drvdata(ofdev, qe_port);
1455 1455
1456 dev_info(&ofdev->dev, "UCC%u assigned to /dev/ttyQE%u\n", 1456 dev_info(&ofdev->dev, "UCC%u assigned to /dev/ttyQE%u\n",
1457 qe_port->ucc_num + 1, qe_port->port.line); 1457 qe_port->ucc_num + 1, qe_port->port.line);
@@ -1471,13 +1471,12 @@ out_free:
1471 1471
1472static int ucc_uart_remove(struct platform_device *ofdev) 1472static int ucc_uart_remove(struct platform_device *ofdev)
1473{ 1473{
1474 struct uart_qe_port *qe_port = dev_get_drvdata(&ofdev->dev); 1474 struct uart_qe_port *qe_port = platform_get_drvdata(ofdev);
1475 1475
1476 dev_info(&ofdev->dev, "removing /dev/ttyQE%u\n", qe_port->port.line); 1476 dev_info(&ofdev->dev, "removing /dev/ttyQE%u\n", qe_port->port.line);
1477 1477
1478 uart_remove_one_port(&ucc_uart_driver, &qe_port->port); 1478 uart_remove_one_port(&ucc_uart_driver, &qe_port->port);
1479 1479
1480 dev_set_drvdata(&ofdev->dev, NULL);
1481 kfree(qe_port); 1480 kfree(qe_port);
1482 1481
1483 return 0; 1482 return 0;
@@ -1518,9 +1517,11 @@ static int __init ucc_uart_init(void)
1518 } 1517 }
1519 1518
1520 ret = platform_driver_register(&ucc_uart_of_driver); 1519 ret = platform_driver_register(&ucc_uart_of_driver);
1521 if (ret) 1520 if (ret) {
1522 printk(KERN_ERR 1521 printk(KERN_ERR
1523 "ucc-uart: could not register platform driver\n"); 1522 "ucc-uart: could not register platform driver\n");
1523 uart_unregister_driver(&ucc_uart_driver);
1524 }
1524 1525
1525 return ret; 1526 return ret;
1526} 1527}