[RFC PATCH] serial: omap: only inform once about missing wakeirq support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The unconditional output in serial_omap_startup clutters dmesg quite a
bit when booting with systemd because the console device is opened
repeatedly.

Without this patch, directly after boot + login I get:

	# dmesg | grep -c 'omap_uart 48024000.serial: no wakeirq for uart2'
	79

This was introduced in commit 2a0b965cfb6e (serial: omap: Add support
for optional wake-up) which was applied for v3.13-rc1.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
Hello,

actually this change is not optimal because it would be nicer to report
once per device instead of not once per driver. But adding a variable to
driver data just for that seems overkill, too. Maybe downgrading the
message to dev_dbg is fine, too?

What do you think?

Best regards
Uwe

 drivers/tty/serial/omap-serial.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 2116e76b9559..bbcd95360553 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -739,8 +739,13 @@ static int serial_omap_startup(struct uart_port *port)
 		}
 		disable_irq(up->wakeirq);
 	} else {
-		dev_info(up->port.dev, "no wakeirq for uart%d\n",
-			 up->port.line);
+		static int once = 1;
+
+		if (once) {
+			dev_info(up->port.dev, "no wakeirq for uart%d\n",
+				 up->port.line);
+			once = 0;
+		}
 	}
 
 	dev_dbg(up->port.dev, "serial_omap_startup+%d\n", up->port.line);
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux