USB: wacom: remove dbg() usage
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 May 2012 04:24:28 +0000 (21:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 May 2012 04:31:55 +0000 (21:31 -0700)
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Ping Cheng <pingc@wacom.com>
Cc: Eduard Hasenleithner <eduard@hasenleithner.at>
Cc: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/tablet/wacom_sys.c
drivers/input/tablet/wacom_wac.c

index 821d2a958e44a8aa31ceee96dcc649e93ad4e001..ac29a68ac53ebf375260d17d8fecae8e138d7453 100644 (file)
@@ -99,6 +99,7 @@ static int wacom_set_report(struct usb_interface *intf, u8 type, u8 id,
 static void wacom_sys_irq(struct urb *urb)
 {
        struct wacom *wacom = urb->context;
+       struct device *dev = &wacom->wacom_wac.input->dev;
        int retval;
 
        switch (urb->status) {
@@ -109,10 +110,12 @@ static void wacom_sys_irq(struct urb *urb)
        case -ENOENT:
        case -ESHUTDOWN:
                /* this urb is terminated, clean up */
-               dbg("%s - urb shutting down with status: %d", __func__, urb->status);
+               dev_dbg(dev, "%s - urb shutting down with status: %d\n",
+                       __func__, urb->status);
                return;
        default:
-               dbg("%s - nonzero urb status received: %d", __func__, urb->status);
+               dev_dbg(dev, "%s - nonzero urb status received: %d\n",
+                       __func__, urb->status);
                goto exit;
        }
 
@@ -122,8 +125,7 @@ static void wacom_sys_irq(struct urb *urb)
        usb_mark_last_busy(wacom->usbdev);
        retval = usb_submit_urb(urb, GFP_ATOMIC);
        if (retval)
-               dev_err(&wacom->wacom_wac.input->dev,
-                       "%s - usb_submit_urb failed with result %d\n",
+               dev_err(dev, "%s - usb_submit_urb failed with result %d\n",
                        __func__, retval);
 }
 
index cecd35c8f0b3ce46cb82bd51514f7b468ab282cd..b327790e9a0ca7d38031ed2691136936b4cc0611 100644 (file)
@@ -76,7 +76,8 @@ static int wacom_pl_irq(struct wacom_wac *wacom)
        int prox, pressure;
 
        if (data[0] != WACOM_REPORT_PENABLED) {
-               dbg("wacom_pl_irq: received unknown report #%d", data[0]);
+               dev_dbg(&input->dev,
+                       "wacom_pl_irq: received unknown report #%d\n", data[0]);
                return 0;
        }
 
@@ -175,7 +176,7 @@ static int wacom_dtu_irq(struct wacom_wac *wacom)
        struct input_dev *input = wacom->input;
        int prox = data[1] & 0x20, pressure;
 
-       dbg("wacom_dtu_irq: received report #%d", data[0]);
+       dev_dbg(&input->dev, "wacom_dtu_irq: received report #%d\n", data[0]);
 
        if (prox) {
                /* Going into proximity select tool */
@@ -211,7 +212,9 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
        int retval = 0;
 
        if (data[0] != WACOM_REPORT_PENABLED) {
-               dbg("wacom_graphire_irq: received unknown report #%d", data[0]);
+               dev_dbg(&input->dev,
+                       "wacom_graphire_irq: received unknown report #%d\n",
+                       data[0]);
                goto exit;
        }
 
@@ -484,7 +487,9 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
 
        if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_INTUOSREAD
                && data[0] != WACOM_REPORT_INTUOSWRITE && data[0] != WACOM_REPORT_INTUOSPAD) {
-               dbg("wacom_intuos_irq: received unknown report #%d", data[0]);
+               dev_dbg(&input->dev,
+                       "wacom_intuos_irq: received unknown report #%d\n",
+                       data[0]);
                 return 0;
        }
 
@@ -830,7 +835,8 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len)
 {
        char *data = wacom->data;
 
-       dbg("wacom_tpc_irq: received report #%d", data[0]);
+       dev_dbg(&wacom->input->dev, "wacom_tpc_irq: received report #%d\n",
+               data[0]);
 
        switch (len) {
        case WACOM_PKGLEN_TPC1FG: