Skip to content

Commit

Permalink
tty: serial: altera_uart: Use platform_{get,set}_drvdata
Browse files Browse the repository at this point in the history
Use the wrapper functions, so we can directly pass a struct
platfrom_device.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tobias Klauser authored and Greg Kroah-Hartman committed Sep 5, 2012
1 parent c0fc208 commit 1a16afa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/tty/serial/altera_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
}

Expand Down

0 comments on commit 1a16afa

Please sign in to comment.