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

USB: xpad.c: 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>
CC: "Magnus Hörlin" <magnus@alefors.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6cc203d7
...@@ -457,6 +457,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha ...@@ -457,6 +457,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha
static void xpad_irq_in(struct urb *urb) static void xpad_irq_in(struct urb *urb)
{ {
struct usb_xpad *xpad = urb->context; struct usb_xpad *xpad = urb->context;
struct device *dev = &xpad->dev->dev;
int retval, status; int retval, status;
status = urb->status; status = urb->status;
...@@ -469,11 +470,11 @@ static void xpad_irq_in(struct urb *urb) ...@@ -469,11 +470,11 @@ static void xpad_irq_in(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__, status); __func__, status);
return; return;
default: default:
dbg("%s - nonzero urb status received: %d", dev_dbg(dev, "%s - nonzero urb status received: %d\n",
__func__, status); __func__, status);
goto exit; goto exit;
} }
...@@ -492,13 +493,15 @@ static void xpad_irq_in(struct urb *urb) ...@@ -492,13 +493,15 @@ static void xpad_irq_in(struct urb *urb)
exit: exit:
retval = usb_submit_urb(urb, GFP_ATOMIC); retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval) if (retval)
dev_err(&xpad->dev->dev, dev_err(dev, "%s - usb_submit_urb failed with result %d\n",
"%s - usb_submit_urb failed with result %d\n",
__func__, retval); __func__, retval);
} }
static void xpad_bulk_out(struct urb *urb) static void xpad_bulk_out(struct urb *urb)
{ {
struct usb_xpad *xpad = urb->context;
struct device *dev = &xpad->dev->dev;
switch (urb->status) { switch (urb->status) {
case 0: case 0:
/* success */ /* success */
...@@ -507,10 +510,12 @@ static void xpad_bulk_out(struct urb *urb) ...@@ -507,10 +510,12 @@ static void xpad_bulk_out(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", __func__, urb->status); dev_dbg(dev, "%s - urb shutting down with status: %d\n",
__func__, urb->status);
break; break;
default: default:
dbg("%s - nonzero urb status received: %d", __func__, urb->status); dev_dbg(dev, "%s - nonzero urb status received: %d\n",
__func__, urb->status);
} }
} }
...@@ -518,6 +523,7 @@ static void xpad_bulk_out(struct urb *urb) ...@@ -518,6 +523,7 @@ static void xpad_bulk_out(struct urb *urb)
static void xpad_irq_out(struct urb *urb) static void xpad_irq_out(struct urb *urb)
{ {
struct usb_xpad *xpad = urb->context; struct usb_xpad *xpad = urb->context;
struct device *dev = &xpad->dev->dev;
int retval, status; int retval, status;
status = urb->status; status = urb->status;
...@@ -531,19 +537,20 @@ static void xpad_irq_out(struct urb *urb) ...@@ -531,19 +537,20 @@ static void xpad_irq_out(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", __func__, status); dev_dbg(dev, "%s - urb shutting down with status: %d\n",
__func__, status);
return; return;
default: default:
dbg("%s - nonzero urb status received: %d", __func__, status); dev_dbg(dev, "%s - nonzero urb status received: %d\n",
__func__, status);
goto exit; goto exit;
} }
exit: exit:
retval = usb_submit_urb(urb, GFP_ATOMIC); retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval) if (retval)
dev_err(&xpad->dev->dev, dev_err(dev, "%s - usb_submit_urb failed with result %d\n",
"%s - usb_submit_urb failed with result %d\n",
__func__, retval); __func__, retval);
} }
...@@ -657,7 +664,8 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect ...@@ -657,7 +664,8 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect
return usb_submit_urb(xpad->irq_out, GFP_ATOMIC); return usb_submit_urb(xpad->irq_out, GFP_ATOMIC);
default: default:
dbg("%s - rumble command sent to unsupported xpad type: %d", dev_dbg(&xpad->dev->dev,
"%s - rumble command sent to unsupported xpad type: %d\n",
__func__, xpad->xtype); __func__, xpad->xtype);
return -1; return -1;
} }
......
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