Skip to contentSkip to conversation

serial: altera-uart: fix NULL device in log message

PATCH In review Ley Foon Tan 3 participants 3 messages Dec 16, 2014 – Jan 1, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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"

---
 drivers/tty/serial/altera_uart.c | 1 +
 1 file changed, 1 insertion(+)
drivers/tty/serial/altera_uart.c +1 -0
index eb15a50..b2859fe 100644
@@ -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);
 
Signature · 1 line
1.8.2.1
Acked-by on v1 1/1
#2 lore raw
In reply to Ley Foon Tan
Quoted 4 lines · Ley Foon Tan

Add device pointer to port->dev.

Before:

Quoted 8 lines

"(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"

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html