summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/cpm_uart
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/cpm_uart
parent9d141cb97703439255e21bbc95903eda32324a3d (diff)
downloadop-kernel-dev-696faedd616e202f5c510cd03dcc8853c11ca6db.zip
op-kernel-dev-696faedd616e202f5c510cd03dcc8853c11ca6db.tar.gz
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/cpm_uart')
-rw-r--r--drivers/tty/serial/cpm_uart/cpm_uart_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
index 97f4e18..f7672ca 100644
--- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
@@ -1384,7 +1384,7 @@ static int cpm_uart_probe(struct platform_device *ofdev)
if (index >= UART_NR)
return -ENODEV;
- dev_set_drvdata(&ofdev->dev, pinfo);
+ platform_set_drvdata(ofdev, pinfo);
/* initialize the device pointer for the port */
pinfo->port.dev = &ofdev->dev;
@@ -1398,7 +1398,7 @@ static int cpm_uart_probe(struct platform_device *ofdev)
static int cpm_uart_remove(struct platform_device *ofdev)
{
- struct uart_cpm_port *pinfo = dev_get_drvdata(&ofdev->dev);
+ struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev);
return uart_remove_one_port(&cpm_reg, &pinfo->port);
}
OpenPOWER on IntegriCloud