diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-25 17:48:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-25 17:48:25 -0400 |
commit | 3f37d8e8e18f4ec7a1bb96ea95910e51e5775d5b (patch) | |
tree | 571fceb60abadf0d8111e97c80e0d8b6665e1151 /drivers/input/misc/cm109.c | |
parent | 9cb757bfac332cb43122c494597dce80e5424820 (diff) |
USB: cm109.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away. This patch removes it from being used in the
driver and uses dev_err() instead.
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/misc/cm109.c')
-rw-r--r-- | drivers/input/misc/cm109.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c index ab860511f016..412fe5719cb6 100644 --- a/drivers/input/misc/cm109.c +++ b/drivers/input/misc/cm109.c | |||
@@ -327,7 +327,9 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev) | |||
327 | 327 | ||
328 | error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); | 328 | error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); |
329 | if (error) | 329 | if (error) |
330 | err("%s: usb_submit_urb (urb_ctl) failed %d", __func__, error); | 330 | dev_err(&dev->intf->dev, |
331 | "%s: usb_submit_urb (urb_ctl) failed %d\n", | ||
332 | __func__, error); | ||
331 | } | 333 | } |
332 | 334 | ||
333 | /* | 335 | /* |
@@ -349,7 +351,7 @@ static void cm109_urb_irq_callback(struct urb *urb) | |||
349 | if (status) { | 351 | if (status) { |
350 | if (status == -ESHUTDOWN) | 352 | if (status == -ESHUTDOWN) |
351 | return; | 353 | return; |
352 | err("%s: urb status %d", __func__, status); | 354 | dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); |
353 | } | 355 | } |
354 | 356 | ||
355 | /* Special keys */ | 357 | /* Special keys */ |
@@ -396,7 +398,8 @@ static void cm109_urb_irq_callback(struct urb *urb) | |||
396 | 398 | ||
397 | error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); | 399 | error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); |
398 | if (error) | 400 | if (error) |
399 | err("%s: usb_submit_urb (urb_ctl) failed %d", | 401 | dev_err(&dev->intf->dev, |
402 | "%s: usb_submit_urb (urb_ctl) failed %d\n", | ||
400 | __func__, error); | 403 | __func__, error); |
401 | } | 404 | } |
402 | 405 | ||
@@ -416,7 +419,7 @@ static void cm109_urb_ctl_callback(struct urb *urb) | |||
416 | dev->ctl_data->byte[3]); | 419 | dev->ctl_data->byte[3]); |
417 | 420 | ||
418 | if (status) | 421 | if (status) |
419 | err("%s: urb status %d", __func__, status); | 422 | dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); |
420 | 423 | ||
421 | spin_lock(&dev->ctl_submit_lock); | 424 | spin_lock(&dev->ctl_submit_lock); |
422 | 425 | ||
@@ -433,7 +436,8 @@ static void cm109_urb_ctl_callback(struct urb *urb) | |||
433 | dev->irq_urb_pending = 1; | 436 | dev->irq_urb_pending = 1; |
434 | error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC); | 437 | error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC); |
435 | if (error) | 438 | if (error) |
436 | err("%s: usb_submit_urb (urb_irq) failed %d", | 439 | dev_err(&dev->intf->dev, |
440 | "%s: usb_submit_urb (urb_irq) failed %d\n", | ||
437 | __func__, error); | 441 | __func__, error); |
438 | } | 442 | } |
439 | } | 443 | } |
@@ -476,7 +480,8 @@ static void cm109_toggle_buzzer_sync(struct cm109_dev *dev, int on) | |||
476 | dev->ctl_data, | 480 | dev->ctl_data, |
477 | USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); | 481 | USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); |
478 | if (error < 0 && error != -EINTR) | 482 | if (error < 0 && error != -EINTR) |
479 | err("%s: usb_control_msg() failed %d", __func__, error); | 483 | dev_err(&dev->intf->dev, "%s: usb_control_msg() failed %d\n", |
484 | __func__, error); | ||
480 | } | 485 | } |
481 | 486 | ||
482 | static void cm109_stop_traffic(struct cm109_dev *dev) | 487 | static void cm109_stop_traffic(struct cm109_dev *dev) |
@@ -518,8 +523,8 @@ static int cm109_input_open(struct input_dev *idev) | |||
518 | 523 | ||
519 | error = usb_autopm_get_interface(dev->intf); | 524 | error = usb_autopm_get_interface(dev->intf); |
520 | if (error < 0) { | 525 | if (error < 0) { |
521 | err("%s - cannot autoresume, result %d", | 526 | dev_err(&idev->dev, "%s - cannot autoresume, result %d\n", |
522 | __func__, error); | 527 | __func__, error); |
523 | return error; | 528 | return error; |
524 | } | 529 | } |
525 | 530 | ||
@@ -537,7 +542,8 @@ static int cm109_input_open(struct input_dev *idev) | |||
537 | 542 | ||
538 | error = usb_submit_urb(dev->urb_ctl, GFP_KERNEL); | 543 | error = usb_submit_urb(dev->urb_ctl, GFP_KERNEL); |
539 | if (error) | 544 | if (error) |
540 | err("%s: usb_submit_urb (urb_ctl) failed %d", __func__, error); | 545 | dev_err(&idev->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", |
546 | __func__, error); | ||
541 | else | 547 | else |
542 | dev->open = 1; | 548 | dev->open = 1; |
543 | 549 | ||
@@ -710,7 +716,8 @@ static int cm109_usb_probe(struct usb_interface *intf, | |||
710 | pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); | 716 | pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); |
711 | ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); | 717 | ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); |
712 | if (ret != USB_PKT_LEN) | 718 | if (ret != USB_PKT_LEN) |
713 | err("invalid payload size %d, expected %d", ret, USB_PKT_LEN); | 719 | dev_err(&intf->dev, "invalid payload size %d, expected %d\n", |
720 | ret, USB_PKT_LEN); | ||
714 | 721 | ||
715 | /* initialise irq urb */ | 722 | /* initialise irq urb */ |
716 | usb_fill_int_urb(dev->urb_irq, udev, pipe, dev->irq_data, | 723 | usb_fill_int_urb(dev->urb_irq, udev, pipe, dev->irq_data, |