From: Doug Kehn Date: Tue, 24 Mar 2015 13:19:27 +0000 (-0500) Subject: tty/serial: omap: fix !wakeirq message X-Git-Tag: v4.1-rc1~61^2~33 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1cf94d3a115ad118a36cba2c9a5383acda94e544;p=karo-tx-linux.git tty/serial: omap: fix !wakeirq message When wakeirq is not used/enabled, "no wakeirq for uart0" is output for all TTY as the log message is generated before the port line is initialized. [ 0.802656] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.811700] omap_uart 44e09000.serial: no wakeirq for uart0 [ 0.812379] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0 [ 1.503622] console [ttyO0] enabled [ 1.509836] omap_uart 48022000.serial: no wakeirq for uart0 [ 1.516118] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 89, base_baud = 3000000) is a OMAP UART1 [ 1.527711] omap_uart 48024000.serial: no wakeirq for uart0 [ 1.533881] 48024000.serial: ttyO2 at MMIO 0x48024000 (irq = 90, base_baud = 3000000) is a OMAP UART2 [ 1.545324] omap_uart 481a6000.serial: no wakeirq for uart0 [ 1.551410] 481a6000.serial: ttyO3 at MMIO 0x481a6000 (irq = 60, base_baud = 3000000) is a OMAP UART3 [ 1.562946] omap_uart 481a8000.serial: no wakeirq for uart0 [ 1.569036] 481a8000.serial: ttyO4 at MMIO 0x481a8000 (irq = 61, base_baud = 3000000) is a OMAP UART4 Fix by moving wakeirq initialization, check, and dev_info() call to after port line initialization and validation. Signed-off-by: Doug Kehn Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 10256fa04b40..211479aa34bb 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1654,11 +1654,6 @@ static int serial_omap_probe(struct platform_device *pdev) up->port.type = PORT_OMAP; up->port.iotype = UPIO_MEM; up->port.irq = uartirq; - up->wakeirq = wakeirq; - if (!up->wakeirq) - dev_info(up->port.dev, "no wakeirq for uart%d\n", - up->port.line); - up->port.regshift = 2; up->port.fifosize = 64; up->port.ops = &serial_omap_pops; @@ -1682,6 +1677,11 @@ static int serial_omap_probe(struct platform_device *pdev) goto err_port_line; } + up->wakeirq = wakeirq; + if (!up->wakeirq) + dev_info(up->port.dev, "no wakeirq for uart%d\n", + up->port.line); + ret = serial_omap_probe_rs485(up, pdev->dev.of_node); if (ret < 0) goto err_rs485;