Commit 8bab534b508230f33be5f7ba8492923754274a8d

Authored by Jiri Slaby
Committed by Greg Kroah-Hartman
1 parent 906cbe1364

TTY: mxser+cyclades remove wait_until_sent debug code

It makes the code really ugly. And since it can be enabled only before
building and only in the source files, it can be barely used by users.
That said, I've not seen anybody to use it in the past few years.

This crap is copied to some more drivers over the tty tree. Since I'm
not their maintainer, I'm not sure if I should remove them too?

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 2 changed files with 2 additions and 23 deletions Side-by-side Diff

drivers/tty/cyclades.c
... ... @@ -45,7 +45,6 @@
45 45 #undef CY_DEBUG_IO
46 46 #undef CY_DEBUG_COUNT
47 47 #undef CY_DEBUG_DTR
48   -#undef CY_DEBUG_WAIT_UNTIL_SENT
49 48 #undef CY_DEBUG_INTERRUPTS
50 49 #undef CY_16Y_HACK
51 50 #undef CY_ENABLE_MONITORING
52 51  
... ... @@ -1678,16 +1677,10 @@
1678 1677 */
1679 1678 if (!timeout || timeout > 2 * info->timeout)
1680 1679 timeout = 2 * info->timeout;
1681   -#ifdef CY_DEBUG_WAIT_UNTIL_SENT
1682   - printk(KERN_DEBUG "In cy_wait_until_sent(%d) check=%d, jiff=%lu...",
1683   - timeout, char_time, jiffies);
1684   -#endif
  1680 +
1685 1681 card = info->card;
1686 1682 if (!cy_is_Z(card)) {
1687 1683 while (cyy_readb(info, CySRER) & CyTxRdy) {
1688   -#ifdef CY_DEBUG_WAIT_UNTIL_SENT
1689   - printk(KERN_DEBUG "Not clean (jiff=%lu)...", jiffies);
1690   -#endif
1691 1684 if (msleep_interruptible(jiffies_to_msecs(char_time)))
1692 1685 break;
1693 1686 if (timeout && time_after(jiffies, orig_jiffies +
... ... @@ -1697,9 +1690,6 @@
1697 1690 }
1698 1691 /* Run one more char cycle */
1699 1692 msleep_interruptible(jiffies_to_msecs(char_time * 5));
1700   -#ifdef CY_DEBUG_WAIT_UNTIL_SENT
1701   - printk(KERN_DEBUG "Clean (jiff=%lu)...done\n", jiffies);
1702   -#endif
1703 1693 }
1704 1694  
1705 1695 static void cy_flush_buffer(struct tty_struct *tty)
... ... @@ -2005,16 +2005,9 @@
2005 2005 */
2006 2006 if (!timeout || timeout > 2 * info->timeout)
2007 2007 timeout = 2 * info->timeout;
2008   -#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
2009   - printk(KERN_DEBUG "In rs_wait_until_sent(%d) check=%lu...",
2010   - timeout, char_time);
2011   - printk("jiff=%lu...", jiffies);
2012   -#endif
  2008 +
2013 2009 spin_lock_irqsave(&info->slock, flags);
2014 2010 while (!((lsr = inb(info->ioaddr + UART_LSR)) & UART_LSR_TEMT)) {
2015   -#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
2016   - printk("lsr = %d (jiff=%lu)...", lsr, jiffies);
2017   -#endif
2018 2011 spin_unlock_irqrestore(&info->slock, flags);
2019 2012 schedule_timeout_interruptible(char_time);
2020 2013 spin_lock_irqsave(&info->slock, flags);
... ... @@ -2025,10 +2018,6 @@
2025 2018 }
2026 2019 spin_unlock_irqrestore(&info->slock, flags);
2027 2020 set_current_state(TASK_RUNNING);
2028   -
2029   -#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
2030   - printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies);
2031   -#endif
2032 2021 }
2033 2022  
2034 2023 /*