* [PATCH] tty: serial: altera_uart: Use platform_{get,set}_drvdata
@ 2012-08-20 13:56 Tobias Klauser
0 siblings, 0 replies; only message in thread
From: Tobias Klauser @ 2012-08-20 13:56 UTC (permalink / raw)
To: Alan Cox, Greg Kroah-Hartman; +Cc: linux-serial
Use the wrapper functions, so we can directly pass a struct
platfrom_device.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
drivers/tty/serial/altera_uart.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index 1f03309..15d80b9 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -591,7 +591,7 @@ static int __devinit altera_uart_probe(struct platform_device *pdev)
port->ops = &altera_uart_ops;
port->flags = UPF_BOOT_AUTOCONF;
- dev_set_drvdata(&pdev->dev, port);
+ platform_set_drvdata(pdev, port);
uart_add_one_port(&altera_uart_driver, port);
@@ -600,11 +600,11 @@ static int __devinit altera_uart_probe(struct platform_device *pdev)
static int __devexit altera_uart_remove(struct platform_device *pdev)
{
- struct uart_port *port = dev_get_drvdata(&pdev->dev);
+ struct uart_port *port = platform_get_drvdata(pdev);
if (port) {
uart_remove_one_port(&altera_uart_driver, port);
- dev_set_drvdata(&pdev->dev, NULL);
+ platform_set_drvdata(pdev, NULL);
port->mapbase = 0;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-20 14:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 13:56 [PATCH] tty: serial: altera_uart: Use platform_{get,set}_drvdata Tobias Klauser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).