Merge tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[cascardo/linux.git] / drivers / staging / media / lirc / lirc_sir.c
index e961b52..39f4733 100644 (file)
@@ -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 -