Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: Replace inline #ifdef TTY_DEBUG_WAIT_UNTIL_SENT

Add tty_debug_wait_until_sent() macro which uses tty_debug() to print
the debug message; remove inlined #ifdef.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Hurley and committed by
Greg Kroah-Hartman
ff8339dc 0a6adc13

+8 -3
+8 -3
drivers/tty/tty_ioctl.c
··· 26 26 27 27 #undef TTY_DEBUG_WAIT_UNTIL_SENT 28 28 29 + #ifdef TTY_DEBUG_WAIT_UNTIL_SENT 30 + # define tty_debug_wait_until_sent(tty, f, args...) tty_debug(tty, f, ##args) 31 + #else 32 + # define tty_debug_wait_until_sent(tty, f, args...) do {} while (0) 33 + #endif 34 + 29 35 #undef DEBUG 30 36 31 37 /* ··· 216 210 217 211 void tty_wait_until_sent(struct tty_struct *tty, long timeout) 218 212 { 219 - #ifdef TTY_DEBUG_WAIT_UNTIL_SENT 220 - printk(KERN_DEBUG "%s wait until sent...\n", tty_name(tty)); 221 - #endif 213 + tty_debug_wait_until_sent(tty, "\n"); 214 + 222 215 if (!timeout) 223 216 timeout = MAX_SCHEDULE_TIMEOUT; 224 217