diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 17:06:57 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-31 17:56:15 -0700 |
commit | 574de559c1797618fd8ed03576837eb3113c5d26 (patch) | |
tree | cbc8d8eeeff81fe6de1f6b33c053feed9fb4b1be /drivers/tty/serial/atmel_serial.c | |
parent | e26439ce03f0808f5d797ca33f180fdb8258335a (diff) | |
download | kernel-common-574de559c1797618fd8ed03576837eb3113c5d26.tar.gz kernel-common-574de559c1797618fd8ed03576837eb3113c5d26.tar.bz2 kernel-common-574de559c1797618fd8ed03576837eb3113c5d26.zip |
serial: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/atmel_serial.c')
-rw-r--r-- | drivers/tty/serial/atmel_serial.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 7e2cb31497c3..d067285a2d20 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -1393,7 +1393,7 @@ static int atmel_init_property(struct atmel_uart_port *atmel_port, struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - struct atmel_uart_data *pdata = pdev->dev.platform_data; + struct atmel_uart_data *pdata = dev_get_platdata(&pdev->dev); if (np) { /* DMA/PDC usage specification */ @@ -1437,7 +1437,7 @@ static void atmel_init_rs485(struct atmel_uart_port *atmel_port, struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - struct atmel_uart_data *pdata = pdev->dev.platform_data; + struct atmel_uart_data *pdata = dev_get_platdata(&pdev->dev); if (np) { u32 rs485_delay[2]; @@ -2028,7 +2028,7 @@ static int atmel_init_port(struct atmel_uart_port *atmel_port, { int ret; struct uart_port *port = &atmel_port->uart; - struct atmel_uart_data *pdata = pdev->dev.platform_data; + struct atmel_uart_data *pdata = dev_get_platdata(&pdev->dev); if (!atmel_init_property(atmel_port, pdev)) atmel_set_ops(port); @@ -2226,7 +2226,7 @@ static int __init atmel_console_init(void) int ret; if (atmel_default_console_device) { struct atmel_uart_data *pdata = - atmel_default_console_device->dev.platform_data; + dev_get_platdata(&atmel_default_console_device->dev); int id = pdata->num; struct atmel_uart_port *port = &atmel_ports[id]; @@ -2334,7 +2334,7 @@ static int atmel_serial_probe(struct platform_device *pdev) { struct atmel_uart_port *port; struct device_node *np = pdev->dev.of_node; - struct atmel_uart_data *pdata = pdev->dev.platform_data; + struct atmel_uart_data *pdata = dev_get_platdata(&pdev->dev); void *data; int ret = -ENODEV; |