aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/bcm5974.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse/bcm5974.c')
-rw-r--r--drivers/input/mouse/bcm5974.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index e410b98c227..d528c23e194 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -604,7 +604,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
604 int retval = 0, size; 604 int retval = 0, size;
605 605
606 if (!data) { 606 if (!data) {
607 err("bcm5974: out of memory"); 607 dev_err(&dev->intf->dev, "out of memory\n");
608 retval = -ENOMEM; 608 retval = -ENOMEM;
609 goto out; 609 goto out;
610 } 610 }
@@ -617,7 +617,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
617 BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); 617 BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000);
618 618
619 if (size != 8) { 619 if (size != 8) {
620 err("bcm5974: could not read from device"); 620 dev_err(&dev->intf->dev, "could not read from device\n");
621 retval = -EIO; 621 retval = -EIO;
622 goto out; 622 goto out;
623 } 623 }
@@ -635,7 +635,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
635 BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); 635 BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000);
636 636
637 if (size != 8) { 637 if (size != 8) {
638 err("bcm5974: could not write to device"); 638 dev_err(&dev->intf->dev, "could not write to device\n");
639 retval = -EIO; 639 retval = -EIO;
640 goto out; 640 goto out;
641 } 641 }
@@ -651,6 +651,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
651static void bcm5974_irq_button(struct urb *urb) 651static void bcm5974_irq_button(struct urb *urb)
652{ 652{
653 struct bcm5974 *dev = urb->context; 653 struct bcm5974 *dev = urb->context;
654 struct usb_interface *intf = dev->intf;
654 int error; 655 int error;
655 656
656 switch (urb->status) { 657 switch (urb->status) {
@@ -660,10 +661,11 @@ static void bcm5974_irq_button(struct urb *urb)
660 case -ECONNRESET: 661 case -ECONNRESET:
661 case -ENOENT: 662 case -ENOENT:
662 case -ESHUTDOWN: 663 case -ESHUTDOWN:
663 dbg("bcm5974: button urb shutting down: %d", urb->status); 664 dev_dbg(&intf->dev, "button urb shutting down: %d\n",
665 urb->status);
664 return; 666 return;
665 default: 667 default:
666 dbg("bcm5974: button urb status: %d", urb->status); 668 dev_dbg(&intf->dev, "button urb status: %d\n", urb->status);
667 goto exit; 669 goto exit;
668 } 670 }
669 671
@@ -674,12 +676,13 @@ static void bcm5974_irq_button(struct urb *urb)
674exit: 676exit:
675 error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); 677 error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC);
676 if (error) 678 if (error)
677 err("bcm5974: button urb failed: %d", error); 679 dev_err(&intf->dev, "button urb failed: %d\n", error);
678} 680}
679 681
680static void bcm5974_irq_trackpad(struct urb *urb) 682static void bcm5974_irq_trackpad(struct urb *urb)
681{ 683{
682 struct bcm5974 *dev = urb->context; 684 struct bcm5974 *dev = urb->context;
685 struct usb_interface *intf = dev->intf;
683 int error; 686 int error;
684 687
685 switch (urb->status) { 688 switch (urb->status) {
@@ -689,10 +692,11 @@ static void bcm5974_irq_trackpad(struct urb *urb)
689 case -ECONNRESET: 692 case -ECONNRESET:
690 case -ENOENT: 693 case -ENOENT:
691 case -ESHUTDOWN: 694 case -ESHUTDOWN:
692 dbg("bcm5974: trackpad urb shutting down: %d", urb->status); 695 dev_dbg(&intf->dev, "trackpad urb shutting down: %d\n",
696 urb->status);
693 return; 697 return;
694 default: 698 default:
695 dbg("bcm5974: trackpad urb status: %d", urb->status); 699 dev_dbg(&intf->dev, "trackpad urb status: %d\n", urb->status);
696 goto exit; 700 goto exit;
697 } 701 }
698 702
@@ -707,7 +711,7 @@ static void bcm5974_irq_trackpad(struct urb *urb)
707exit: 711exit:
708 error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); 712 error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC);
709 if (error) 713 if (error)
710 err("bcm5974: trackpad urb failed: %d", error); 714 dev_err(&intf->dev, "trackpad urb failed: %d\n", error);
711} 715}
712 716
713/* 717/*
@@ -853,7 +857,7 @@ static int bcm5974_probe(struct usb_interface *iface,
853 dev = kzalloc(sizeof(struct bcm5974), GFP_KERNEL); 857 dev = kzalloc(sizeof(struct bcm5974), GFP_KERNEL);
854 input_dev = input_allocate_device(); 858 input_dev = input_allocate_device();
855 if (!dev || !input_dev) { 859 if (!dev || !input_dev) {
856 err("bcm5974: out of memory"); 860 dev_err(&iface->dev, "out of memory\n");
857 goto err_free_devs; 861 goto err_free_devs;
858 } 862 }
859 863