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>
This commit is contained in:
parent
0a6adc131c
commit
ff8339dc16
1 changed files with 8 additions and 3 deletions
|
@ -26,6 +26,12 @@
|
||||||
|
|
||||||
#undef TTY_DEBUG_WAIT_UNTIL_SENT
|
#undef TTY_DEBUG_WAIT_UNTIL_SENT
|
||||||
|
|
||||||
|
#ifdef TTY_DEBUG_WAIT_UNTIL_SENT
|
||||||
|
# define tty_debug_wait_until_sent(tty, f, args...) tty_debug(tty, f, ##args)
|
||||||
|
#else
|
||||||
|
# define tty_debug_wait_until_sent(tty, f, args...) do {} while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef DEBUG
|
#undef DEBUG
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -210,9 +216,8 @@ int tty_unthrottle_safe(struct tty_struct *tty)
|
||||||
|
|
||||||
void tty_wait_until_sent(struct tty_struct *tty, long timeout)
|
void tty_wait_until_sent(struct tty_struct *tty, long timeout)
|
||||||
{
|
{
|
||||||
#ifdef TTY_DEBUG_WAIT_UNTIL_SENT
|
tty_debug_wait_until_sent(tty, "\n");
|
||||||
printk(KERN_DEBUG "%s wait until sent...\n", tty_name(tty));
|
|
||||||
#endif
|
|
||||||
if (!timeout)
|
if (!timeout)
|
||||||
timeout = MAX_SCHEDULE_TIMEOUT;
|
timeout = MAX_SCHEDULE_TIMEOUT;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue