2014-12-16 07:43:59

by Ley Foon Tan

[permalink] [raw]
Subject: [PATCH] serial: altera-uart: fix NULL device in log message

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 <[email protected]>
---
drivers/tty/serial/altera_uart.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index eb15a50..b2859fe 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -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);

--
1.8.2.1


2014-12-16 08:00:41

by Tobias Klauser

[permalink] [raw]
Subject: Re: [PATCH] serial: altera-uart: fix NULL device in log message

On 2014-12-16 at 08:28:34 +0100, Ley Foon Tan <[email protected]> wrote:
> 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 <[email protected]>

Acked-by: Tobias Klauser <[email protected]>