Skip to content

Commit

Permalink
Serial: serial_core, use pr_debug
Browse files Browse the repository at this point in the history
serial_core, use pr_debug

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed May 7, 2007
1 parent 1733310 commit eb3a1e1
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@
#include <asm/irq.h>
#include <asm/uaccess.h>

#undef DEBUG
#ifdef DEBUG
#define DPRINTK(x...) printk(x)
#else
#define DPRINTK(x...) do { } while (0)
#endif

/*
* This is used to lock changes in serial line configuration.
*/
Expand Down Expand Up @@ -552,7 +545,7 @@ static void uart_flush_buffer(struct tty_struct *tty)
return;
}

DPRINTK("uart_flush_buffer(%d) called\n", tty->index);
pr_debug("uart_flush_buffer(%d) called\n", tty->index);

spin_lock_irqsave(&port->lock, flags);
uart_circ_clear(&state->info->xmit);
Expand Down Expand Up @@ -1224,7 +1217,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)

port = state->port;

DPRINTK("uart_close(%d) called\n", port->line);
pr_debug("uart_close(%d) called\n", port->line);

mutex_lock(&state->mutex);

Expand Down Expand Up @@ -1343,7 +1336,7 @@ static void uart_wait_until_sent(struct tty_struct *tty, int timeout)

expire = jiffies + timeout;

DPRINTK("uart_wait_until_sent(%d), jiffies=%lu, expire=%lu...\n",
pr_debug("uart_wait_until_sent(%d), jiffies=%lu, expire=%lu...\n",
port->line, jiffies, expire);

/*
Expand Down Expand Up @@ -1372,7 +1365,7 @@ static void uart_hangup(struct tty_struct *tty)
struct uart_state *state = tty->driver_data;

BUG_ON(!kernel_locked());
DPRINTK("uart_hangup(%d)\n", state->port->line);
pr_debug("uart_hangup(%d)\n", state->port->line);

mutex_lock(&state->mutex);
if (state->info && state->info->flags & UIF_NORMAL_ACTIVE) {
Expand Down Expand Up @@ -1570,7 +1563,7 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
int retval, line = tty->index;

BUG_ON(!kernel_locked());
DPRINTK("uart_open(%d) called\n", line);
pr_debug("uart_open(%d) called\n", line);

/*
* tty->driver->num won't change, so we won't fail here with
Expand Down

0 comments on commit eb3a1e1

Please sign in to comment.