USB: iforce: remove dbg() usage
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 May 2012 04:26:05 +0000 (21:26 -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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/joystick/iforce/iforce-packets.c
drivers/input/joystick/iforce/iforce-usb.c

index 68f5f1e2d73bc86697eb140c961ba1a6067a2b6d..0d8f53b5ce53591fef00db09e4fe874e8936afdb 100644 (file)
@@ -266,12 +266,14 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
                        iforce->ctrl->status != -EINPROGRESS, HZ);
 
                if (iforce->ctrl->status) {
-                       dbg("iforce->ctrl->status = %d", iforce->ctrl->status);
+                       dev_dbg(&iforce->dev->dev,
+                               "iforce->ctrl->status = %d\n",
+                               iforce->ctrl->status);
                        usb_unlink_urb(iforce->ctrl);
                        return -1;
                }
 #else
-               dbg("iforce_get_id_packet: iforce->bus = USB!");
+               printk(KERN_DEBUG "iforce_get_id_packet: iforce->bus = USB!\n");
 #endif
                }
                break;
index 86d3538e104dfcc61cf8d0dd2967374d516efcef..15e8d6531e25e7b4d7b767138876457646b2353e 100644 (file)
@@ -76,6 +76,7 @@ void iforce_usb_xmit(struct iforce *iforce)
 static void iforce_usb_irq(struct urb *urb)
 {
        struct iforce *iforce = urb->context;
+       struct device *dev = &iforce->dev->dev;
        int status;
 
        switch (urb->status) {
@@ -86,11 +87,12 @@ static void iforce_usb_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 - urb has status of: %d", __func__, urb->status);
+               dev_dbg(dev, "%s - urb has status of: %d\n",
+                       __func__, urb->status);
                goto exit;
        }
 
@@ -100,8 +102,7 @@ static void iforce_usb_irq(struct urb *urb)
 exit:
        status = usb_submit_urb (urb, GFP_ATOMIC);
        if (status)
-               dev_err(&iforce->dev->dev,
-                       "%s - usb_submit_urb failed with result %d\n",
+               dev_err(dev, "%s - usb_submit_urb failed with result %d\n",
                        __func__, status);
 }
 
@@ -111,7 +112,8 @@ static void iforce_usb_out(struct urb *urb)
 
        if (urb->status) {
                clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
-               dbg("urb->status %d, exiting", urb->status);
+               dev_dbg(&iforce->dev->dev, "urb->status %d, exiting\n",
+                       urb->status);
                return;
        }