]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
input: lm8323: get rid of useless debug macro
authorFelipe Balbi <felipe.balbi@nokia.com>
Thu, 19 Feb 2009 12:29:40 +0000 (12:29 +0000)
committerTony Lindgren <tony@atomide.com>
Fri, 20 Feb 2009 00:24:18 +0000 (16:24 -0800)
we can use dev_vdbg() which is only true when VERBOSE is
enabled.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/input/keyboard/lm8323.c

index 60abe61d4f750bb4dd953e4ea9dbfba800e1b8b2..0812bef62182e0603e5724bc83fa2e7e47cd8b01 100644 (file)
 #include <asm/mach-types.h>
 #include <asm/mach/irq.h>
 
-#ifdef VERBOSE
-#define debug dev_dbg
-#else
-#define debug(...)
-#endif
-
 /* Commands to send to the chip. */
 #define LM8323_CMD_READ_ID             0x80 /* Read chip ID. */
 #define LM8323_CMD_WRITE_CFG           0x81 /* Set configuration item. */
@@ -303,7 +297,7 @@ static void process_keys(struct lm8323_chip *lm)
                s16 keycode = lm->keymap[key];
 
                if (likely(keycode > 0)) {
-                       debug(&lm->client->dev, "key 0x%02x %s\n", key,
+                       dev_vdbg(&lm->client->dev, "key 0x%02x %s\n", key,
                              isdown ? "down" : "up");
                        if (likely(lm->kp_enabled)) {
                                input_report_key(lm->idev, keycode, isdown);
@@ -337,13 +331,13 @@ static void lm8323_process_error(struct lm8323_chip *lm)
 
        if (lm8323_read(lm, LM8323_CMD_READ_ERR, &error, 1) == 1) {
                if (error & ERR_FIFOOVER)
-                       debug(&lm->client->dev, "fifo overflow!\n");
+                       dev_vdbg(&lm->client->dev, "fifo overflow!\n");
                if (error & ERR_KEYOVR)
-                       debug(&lm->client->dev, "more than two keys pressed\n");
+                       dev_vdbg(&lm->client->dev, "more than two keys pressed\n");
                if (error & ERR_CMDUNK)
-                       debug(&lm->client->dev, "unknown command submitted\n");
+                       dev_vdbg(&lm->client->dev, "unknown command submitted\n");
                if (error & ERR_BADPAR)
-                       debug(&lm->client->dev, "bad command parameter\n");
+                       dev_vdbg(&lm->client->dev, "bad command parameter\n");
        }
 }
 
@@ -408,10 +402,10 @@ static void lm8323_work(struct work_struct *work)
                        process_keys(lm);
                if (ints & INT_ROTATOR) {
                        /* We don't currently support the rotator. */
-                       debug(&lm->client->dev, "rotator fired\n");
+                       dev_vdbg(&lm->client->dev, "rotator fired\n");
                }
                if (ints & INT_ERROR) {
-                       debug(&lm->client->dev, "error!\n");
+                       dev_vdbg(&lm->client->dev, "error!\n");
                        lm8323_process_error(lm);
                }
                if (ints & INT_NOINIT) {
@@ -420,15 +414,15 @@ static void lm8323_work(struct work_struct *work)
                        lm8323_configure(lm);
                }
                if (ints & INT_PWM1) {
-                       debug(&lm->client->dev, "pwm1 engine completed\n");
+                       dev_vdbg(&lm->client->dev, "pwm1 engine completed\n");
                        pwm_done(&lm->pwm1);
                }
                if (ints & INT_PWM2) {
-                       debug(&lm->client->dev, "pwm2 engine completed\n");
+                       dev_vdbg(&lm->client->dev, "pwm2 engine completed\n");
                        pwm_done(&lm->pwm2);
                }
                if (ints & INT_PWM3) {
-                       debug(&lm->client->dev, "pwm3 engine completed\n");
+                       dev_vdbg(&lm->client->dev, "pwm3 engine completed\n");
                        pwm_done(&lm->pwm3);
                }
        }
@@ -714,7 +708,7 @@ static int lm8323_probe(struct i2c_client *client,
                lm->size_x = 12;
        }
 
-       debug(&c->dev, "Keypad size: %d x %d\n", lm->size_x, lm->size_y);
+       dev_vdbg(&client->dev, "Keypad size: %d x %d\n", lm->size_x, lm->size_y);
 
        lm->debounce_time = pdata->debounce_time;
        if (lm->debounce_time == 0) /* Default. */