summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/sunhv.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-05-23 19:39:36 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-03 10:21:33 -0700
commit696faedd616e202f5c510cd03dcc8853c11ca6db (patch)
tree45ebab791238ff927788d9ae31bde7f59b506060 /drivers/tty/serial/sunhv.c
parent9d141cb97703439255e21bbc95903eda32324a3d (diff)
serial: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Also, unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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)
if (err)
goto out_remove_port;
- dev_set_drvdata(&op->dev, port);
+ platform_set_drvdata(op, port);
return 0;
@@ -601,7 +601,7 @@ out_free_port:
static int hv_remove(struct platform_device *dev)
{
- struct uart_port *port = dev_get_drvdata(&dev->dev);
+ struct uart_port *port = platform_get_drvdata(dev);
free_irq(port->irq, port);
@@ -612,8 +612,6 @@ static int hv_remove(struct platform_device *dev)
kfree(port);
sunhv_port = NULL;
- dev_set_drvdata(&dev->dev, NULL);
-
return 0;
}