diff options
author | Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> | 2014-10-26 17:46:00 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 07:36:36 (GMT) |
commit | c96bf1d6a49f0b0d38d668195ee34de52693fb87 (patch) | |
tree | 20b77f321b36a9a2fa86104fcfe968a59a4883d4 /drivers/staging | |
parent | be4aa8157c981a8bb9634b886bf1180f97205259 (diff) | |
download | linux-c96bf1d6a49f0b0d38d668195ee34de52693fb87.tar.xz |
staging: media: lirc: lirc_sir.c: use pr_debug and dev_dbg instead of dprintk
This patch removes the custom printk macro dprintk and replaces most of
the calls made to it by dev_dbg. pr_debug was used when the calling
function did not provide the appropiate device variable.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/lirc/lirc_sir.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media/lirc/lirc_sir.c index 2ee55ea..4af82e6 100644 --- a/drivers/staging/media/lirc/lirc_sir.c +++ b/drivers/staging/media/lirc/lirc_sir.c @@ -140,12 +140,6 @@ static int rx_buf[RBUF_LEN]; static unsigned int rx_tail, rx_head; static bool debug; -#define dprintk(fmt, args...) \ - do { \ - if (debug) \ - printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ - fmt, ## args); \ - } while (0) /* SECTION: Prototypes */ @@ -322,7 +316,7 @@ static void add_read_queue(int flag, unsigned long val) unsigned int new_rx_tail; int newval; - dprintk("add flag %d with val %lu\n", flag, val); + pr_debug("add flag %d with val %lu\n", flag, val); newval = val & PULSE_MASK; @@ -342,7 +336,7 @@ static void add_read_queue(int flag, unsigned long val) } new_rx_tail = (rx_tail + 1) & (RBUF_LEN - 1); if (new_rx_tail == rx_head) { - dprintk("Buffer overrun.\n"); + pr_debug("Buffer overrun.\n"); return; } rx_buf[rx_tail] = newval; @@ -439,7 +433,8 @@ static void sir_timeout(unsigned long data) outb(UART_FCR_CLEAR_RCVR, io + UART_FCR); /* determine 'virtual' pulse end: */ pulse_end = delta(&last_tv, &last_intr_tv); - dprintk("timeout add %d for %lu usec\n", last_value, pulse_end); + dev_dbg(driver.dev, "timeout add %d for %lu usec\n", + last_value, pulse_end); add_read_queue(last_value, pulse_end); last_value = 0; last_tv = last_intr_tv; @@ -479,14 +474,15 @@ static irqreturn_t sir_interrupt(int irq, void *dev_id) do_gettimeofday(&curr_tv); deltv = delta(&last_tv, &curr_tv); deltintrtv = delta(&last_intr_tv, &curr_tv); - dprintk("t %lu, d %d\n", deltintrtv, (int)data); + dev_dbg(driver.dev, "t %lu, d %d\n", + deltintrtv, (int)data); /* * if nothing came in last X cycles, * it was gap */ if (deltintrtv > TIME_CONST * threshold) { if (last_value) { - dprintk("GAP\n"); + dev_dbg(driver.dev, "GAP\n"); /* simulate signal change */ add_read_queue(last_value, deltv - |