diff options
Diffstat (limited to 'drivers/input/mouse/bcm5974.c')
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index f9e2758b9f46..2cf681d98c0d 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
@@ -584,7 +584,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) | |||
584 | int retval = 0, size; | 584 | int retval = 0, size; |
585 | 585 | ||
586 | if (!data) { | 586 | if (!data) { |
587 | err("bcm5974: out of memory"); | 587 | dev_err(&dev->intf->dev, "out of memory\n"); |
588 | retval = -ENOMEM; | 588 | retval = -ENOMEM; |
589 | goto out; | 589 | goto out; |
590 | } | 590 | } |
@@ -597,7 +597,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) | |||
597 | BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); | 597 | BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); |
598 | 598 | ||
599 | if (size != 8) { | 599 | if (size != 8) { |
600 | err("bcm5974: could not read from device"); | 600 | dev_err(&dev->intf->dev, "could not read from device\n"); |
601 | retval = -EIO; | 601 | retval = -EIO; |
602 | goto out; | 602 | goto out; |
603 | } | 603 | } |
@@ -615,7 +615,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) | |||
615 | BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); | 615 | BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); |
616 | 616 | ||
617 | if (size != 8) { | 617 | if (size != 8) { |
618 | err("bcm5974: could not write to device"); | 618 | dev_err(&dev->intf->dev, "could not write to device\n"); |
619 | retval = -EIO; | 619 | retval = -EIO; |
620 | goto out; | 620 | goto out; |
621 | } | 621 | } |
@@ -631,6 +631,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) | |||
631 | static void bcm5974_irq_button(struct urb *urb) | 631 | static void bcm5974_irq_button(struct urb *urb) |
632 | { | 632 | { |
633 | struct bcm5974 *dev = urb->context; | 633 | struct bcm5974 *dev = urb->context; |
634 | struct usb_interface *intf = dev->intf; | ||
634 | int error; | 635 | int error; |
635 | 636 | ||
636 | switch (urb->status) { | 637 | switch (urb->status) { |
@@ -640,10 +641,11 @@ static void bcm5974_irq_button(struct urb *urb) | |||
640 | case -ECONNRESET: | 641 | case -ECONNRESET: |
641 | case -ENOENT: | 642 | case -ENOENT: |
642 | case -ESHUTDOWN: | 643 | case -ESHUTDOWN: |
643 | dbg("bcm5974: button urb shutting down: %d", urb->status); | 644 | dev_dbg(&intf->dev, "button urb shutting down: %d\n", |
645 | urb->status); | ||
644 | return; | 646 | return; |
645 | default: | 647 | default: |
646 | dbg("bcm5974: button urb status: %d", urb->status); | 648 | dev_dbg(&intf->dev, "button urb status: %d\n", urb->status); |
647 | goto exit; | 649 | goto exit; |
648 | } | 650 | } |
649 | 651 | ||
@@ -654,12 +656,13 @@ static void bcm5974_irq_button(struct urb *urb) | |||
654 | exit: | 656 | exit: |
655 | error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); | 657 | error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); |
656 | if (error) | 658 | if (error) |
657 | err("bcm5974: button urb failed: %d", error); | 659 | dev_err(&intf->dev, "button urb failed: %d\n", error); |
658 | } | 660 | } |
659 | 661 | ||
660 | static void bcm5974_irq_trackpad(struct urb *urb) | 662 | static void bcm5974_irq_trackpad(struct urb *urb) |
661 | { | 663 | { |
662 | struct bcm5974 *dev = urb->context; | 664 | struct bcm5974 *dev = urb->context; |
665 | struct usb_interface *intf = dev->intf; | ||
663 | int error; | 666 | int error; |
664 | 667 | ||
665 | switch (urb->status) { | 668 | switch (urb->status) { |
@@ -669,10 +672,11 @@ static void bcm5974_irq_trackpad(struct urb *urb) | |||
669 | case -ECONNRESET: | 672 | case -ECONNRESET: |
670 | case -ENOENT: | 673 | case -ENOENT: |
671 | case -ESHUTDOWN: | 674 | case -ESHUTDOWN: |
672 | dbg("bcm5974: trackpad urb shutting down: %d", urb->status); | 675 | dev_dbg(&intf->dev, "trackpad urb shutting down: %d\n", |
676 | urb->status); | ||
673 | return; | 677 | return; |
674 | default: | 678 | default: |
675 | dbg("bcm5974: trackpad urb status: %d", urb->status); | 679 | dev_dbg(&intf->dev, "trackpad urb status: %d\n", urb->status); |
676 | goto exit; | 680 | goto exit; |
677 | } | 681 | } |
678 | 682 | ||
@@ -687,7 +691,7 @@ static void bcm5974_irq_trackpad(struct urb *urb) | |||
687 | exit: | 691 | exit: |
688 | error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); | 692 | error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); |
689 | if (error) | 693 | if (error) |
690 | err("bcm5974: trackpad urb failed: %d", error); | 694 | dev_err(&intf->dev, "trackpad urb failed: %d\n", error); |
691 | } | 695 | } |
692 | 696 | ||
693 | /* | 697 | /* |
@@ -833,7 +837,7 @@ static int bcm5974_probe(struct usb_interface *iface, | |||
833 | dev = kzalloc(sizeof(struct bcm5974), GFP_KERNEL); | 837 | dev = kzalloc(sizeof(struct bcm5974), GFP_KERNEL); |
834 | input_dev = input_allocate_device(); | 838 | input_dev = input_allocate_device(); |
835 | if (!dev || !input_dev) { | 839 | if (!dev || !input_dev) { |
836 | err("bcm5974: out of memory"); | 840 | dev_err(&iface->dev, "out of memory\n"); |
837 | goto err_free_devs; | 841 | goto err_free_devs; |
838 | } | 842 | } |
839 | 843 | ||