diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-02 00:32:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-02 00:32:59 -0400 |
commit | c4f0bbcd1d53dc40e2ac56f2ab116f9ba612a8ee (patch) | |
tree | abe44af495890c0fa8e949f2c310dd5313efdae5 /drivers/input/joystick/xpad.c | |
parent | 6cc203d77eb4a29a148ec598048ab1b97e83160c (diff) |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/joystick/xpad.c')
-rw-r--r-- | drivers/input/joystick/xpad.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index d760031430a3..2e106b0796ce 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -457,6 +457,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha | |||
457 | static void xpad_irq_in(struct urb *urb) | 457 | static void xpad_irq_in(struct urb *urb) |
458 | { | 458 | { |
459 | struct usb_xpad *xpad = urb->context; | 459 | struct usb_xpad *xpad = urb->context; |
460 | struct device *dev = &xpad->dev->dev; | ||
460 | int retval, status; | 461 | int retval, status; |
461 | 462 | ||
462 | status = urb->status; | 463 | status = urb->status; |
@@ -469,11 +470,11 @@ static void xpad_irq_in(struct urb *urb) | |||
469 | case -ENOENT: | 470 | case -ENOENT: |
470 | case -ESHUTDOWN: | 471 | case -ESHUTDOWN: |
471 | /* this urb is terminated, clean up */ | 472 | /* this urb is terminated, clean up */ |
472 | dbg("%s - urb shutting down with status: %d", | 473 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
473 | __func__, status); | 474 | __func__, status); |
474 | return; | 475 | return; |
475 | default: | 476 | default: |
476 | dbg("%s - nonzero urb status received: %d", | 477 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
477 | __func__, status); | 478 | __func__, status); |
478 | goto exit; | 479 | goto exit; |
479 | } | 480 | } |
@@ -492,13 +493,15 @@ static void xpad_irq_in(struct urb *urb) | |||
492 | exit: | 493 | exit: |
493 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 494 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
494 | if (retval) | 495 | if (retval) |
495 | dev_err(&xpad->dev->dev, | 496 | dev_err(dev, "%s - usb_submit_urb failed with result %d\n", |
496 | "%s - usb_submit_urb failed with result %d\n", | ||
497 | __func__, retval); | 497 | __func__, retval); |
498 | } | 498 | } |
499 | 499 | ||
500 | static void xpad_bulk_out(struct urb *urb) | 500 | static void xpad_bulk_out(struct urb *urb) |
501 | { | 501 | { |
502 | struct usb_xpad *xpad = urb->context; | ||
503 | struct device *dev = &xpad->dev->dev; | ||
504 | |||
502 | switch (urb->status) { | 505 | switch (urb->status) { |
503 | case 0: | 506 | case 0: |
504 | /* success */ | 507 | /* success */ |
@@ -507,10 +510,12 @@ static void xpad_bulk_out(struct urb *urb) | |||
507 | case -ENOENT: | 510 | case -ENOENT: |
508 | case -ESHUTDOWN: | 511 | case -ESHUTDOWN: |
509 | /* this urb is terminated, clean up */ | 512 | /* this urb is terminated, clean up */ |
510 | dbg("%s - urb shutting down with status: %d", __func__, urb->status); | 513 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
514 | __func__, urb->status); | ||
511 | break; | 515 | break; |
512 | default: | 516 | default: |
513 | dbg("%s - nonzero urb status received: %d", __func__, urb->status); | 517 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
518 | __func__, urb->status); | ||
514 | } | 519 | } |
515 | } | 520 | } |
516 | 521 | ||
@@ -518,6 +523,7 @@ static void xpad_bulk_out(struct urb *urb) | |||
518 | static void xpad_irq_out(struct urb *urb) | 523 | static void xpad_irq_out(struct urb *urb) |
519 | { | 524 | { |
520 | struct usb_xpad *xpad = urb->context; | 525 | struct usb_xpad *xpad = urb->context; |
526 | struct device *dev = &xpad->dev->dev; | ||
521 | int retval, status; | 527 | int retval, status; |
522 | 528 | ||
523 | status = urb->status; | 529 | status = urb->status; |
@@ -531,19 +537,20 @@ static void xpad_irq_out(struct urb *urb) | |||
531 | case -ENOENT: | 537 | case -ENOENT: |
532 | case -ESHUTDOWN: | 538 | case -ESHUTDOWN: |
533 | /* this urb is terminated, clean up */ | 539 | /* this urb is terminated, clean up */ |
534 | dbg("%s - urb shutting down with status: %d", __func__, status); | 540 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
541 | __func__, status); | ||
535 | return; | 542 | return; |
536 | 543 | ||
537 | default: | 544 | default: |
538 | dbg("%s - nonzero urb status received: %d", __func__, status); | 545 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
546 | __func__, status); | ||
539 | goto exit; | 547 | goto exit; |
540 | } | 548 | } |
541 | 549 | ||
542 | exit: | 550 | exit: |
543 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 551 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
544 | if (retval) | 552 | if (retval) |
545 | dev_err(&xpad->dev->dev, | 553 | dev_err(dev, "%s - usb_submit_urb failed with result %d\n", |
546 | "%s - usb_submit_urb failed with result %d\n", | ||
547 | __func__, retval); | 554 | __func__, retval); |
548 | } | 555 | } |
549 | 556 | ||
@@ -657,7 +664,8 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect | |||
657 | return usb_submit_urb(xpad->irq_out, GFP_ATOMIC); | 664 | return usb_submit_urb(xpad->irq_out, GFP_ATOMIC); |
658 | 665 | ||
659 | default: | 666 | default: |
660 | dbg("%s - rumble command sent to unsupported xpad type: %d", | 667 | dev_dbg(&xpad->dev->dev, |
668 | "%s - rumble command sent to unsupported xpad type: %d\n", | ||
661 | __func__, xpad->xtype); | 669 | __func__, xpad->xtype); |
662 | return -1; | 670 | return -1; |
663 | } | 671 | } |