aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sunhv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/sunhv.c')
-rw-r--r--drivers/tty/serial/sunhv.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c
index ba60708053e0..cf86e729532b 100644
--- a/drivers/tty/serial/sunhv.c
+++ b/drivers/tty/serial/sunhv.c
@@ -577,7 +577,7 @@ static int hv_probe(struct platform_device *op)
577 if (err) 577 if (err)
578 goto out_remove_port; 578 goto out_remove_port;
579 579
580 dev_set_drvdata(&op->dev, port); 580 platform_set_drvdata(op, port);
581 581
582 return 0; 582 return 0;
583 583
@@ -601,7 +601,7 @@ out_free_port:
601 601
602static int hv_remove(struct platform_device *dev) 602static int hv_remove(struct platform_device *dev)
603{ 603{
604 struct uart_port *port = dev_get_drvdata(&dev->dev); 604 struct uart_port *port = platform_get_drvdata(dev);
605 605
606 free_irq(port->irq, port); 606 free_irq(port->irq, port);
607 607
@@ -612,8 +612,6 @@ static int hv_remove(struct platform_device *dev)
612 kfree(port); 612 kfree(port);
613 sunhv_port = NULL; 613 sunhv_port = NULL;
614 614
615 dev_set_drvdata(&dev->dev, NULL);
616
617 return 0; 615 return 0;
618} 616}
619 617