OSDN Git Service

serial: altera-uart: fix NULL device in log message
authorLey Foon Tan <lftan@altera.com>
Tue, 16 Dec 2014 07:28:34 +0000 (15:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jan 2015 22:28:17 +0000 (14:28 -0800)
Add device pointer to port->dev.

Before:

"(NULL device *): ttyAL0 at MMIO 0x2020 (irq = 6, base_baud = 3125000)
is a Altera UART"

After:
"altera_uart 2020.serial: ttyAL0 at MMIO 0x2020 (irq = 6, base_baud = 3125000)
is a Altera UART"

Signed-off-by: Ley Foon Tan <lftan@altera.com>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/altera_uart.c

index eb15a50..b2859fe 100644 (file)
@@ -589,6 +589,7 @@ static int altera_uart_probe(struct platform_device *pdev)
        port->iotype = SERIAL_IO_MEM;
        port->ops = &altera_uart_ops;
        port->flags = UPF_BOOT_AUTOCONF;
+       port->dev = &pdev->dev;
 
        platform_set_drvdata(pdev, port);