Commit f576125d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: iforce: remove dbg() usage

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3b6aee23
...@@ -266,12 +266,14 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) ...@@ -266,12 +266,14 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
iforce->ctrl->status != -EINPROGRESS, HZ); iforce->ctrl->status != -EINPROGRESS, HZ);
if (iforce->ctrl->status) { 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); usb_unlink_urb(iforce->ctrl);
return -1; return -1;
} }
#else #else
dbg("iforce_get_id_packet: iforce->bus = USB!"); printk(KERN_DEBUG "iforce_get_id_packet: iforce->bus = USB!\n");
#endif #endif
} }
break; break;
......
...@@ -76,6 +76,7 @@ void iforce_usb_xmit(struct iforce *iforce) ...@@ -76,6 +76,7 @@ void iforce_usb_xmit(struct iforce *iforce)
static void iforce_usb_irq(struct urb *urb) static void iforce_usb_irq(struct urb *urb)
{ {
struct iforce *iforce = urb->context; struct iforce *iforce = urb->context;
struct device *dev = &iforce->dev->dev;
int status; int status;
switch (urb->status) { switch (urb->status) {
...@@ -86,11 +87,12 @@ static void iforce_usb_irq(struct urb *urb) ...@@ -86,11 +87,12 @@ static void iforce_usb_irq(struct urb *urb)
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
/* this urb is terminated, clean up */ /* this urb is terminated, clean up */
dbg("%s - urb shutting down with status: %d", dev_dbg(dev, "%s - urb shutting down with status: %d\n",
__func__, urb->status); __func__, urb->status);
return; return;
default: 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; goto exit;
} }
...@@ -100,8 +102,7 @@ static void iforce_usb_irq(struct urb *urb) ...@@ -100,8 +102,7 @@ static void iforce_usb_irq(struct urb *urb)
exit: exit:
status = usb_submit_urb (urb, GFP_ATOMIC); status = usb_submit_urb (urb, GFP_ATOMIC);
if (status) if (status)
dev_err(&iforce->dev->dev, dev_err(dev, "%s - usb_submit_urb failed with result %d\n",
"%s - usb_submit_urb failed with result %d\n",
__func__, status); __func__, status);
} }
...@@ -111,7 +112,8 @@ static void iforce_usb_out(struct urb *urb) ...@@ -111,7 +112,8 @@ static void iforce_usb_out(struct urb *urb)
if (urb->status) { if (urb->status) {
clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); 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; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment