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.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index 6dedded2722..ea67c49146a 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -312,6 +312,8 @@ static void setup_events_to_report(struct input_dev *input_dev,
312 __set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit); 312 __set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit);
313 __set_bit(BTN_TOOL_QUADTAP, input_dev->keybit); 313 __set_bit(BTN_TOOL_QUADTAP, input_dev->keybit);
314 __set_bit(BTN_LEFT, input_dev->keybit); 314 __set_bit(BTN_LEFT, input_dev->keybit);
315
316 input_set_events_per_packet(input_dev, 60);
315} 317}
316 318
317/* report button data as logical button state */ 319/* report button data as logical button state */
@@ -580,23 +582,30 @@ exit:
580 */ 582 */
581static int bcm5974_start_traffic(struct bcm5974 *dev) 583static int bcm5974_start_traffic(struct bcm5974 *dev)
582{ 584{
583 if (bcm5974_wellspring_mode(dev, true)) { 585 int error;
586
587 error = bcm5974_wellspring_mode(dev, true);
588 if (error) {
584 dprintk(1, "bcm5974: mode switch failed\n"); 589 dprintk(1, "bcm5974: mode switch failed\n");
585 goto error; 590 goto err_out;
586 } 591 }
587 592
588 if (usb_submit_urb(dev->bt_urb, GFP_KERNEL)) 593 error = usb_submit_urb(dev->bt_urb, GFP_KERNEL);
589 goto error; 594 if (error)
595 goto err_reset_mode;
590 596
591 if (usb_submit_urb(dev->tp_urb, GFP_KERNEL)) 597 error = usb_submit_urb(dev->tp_urb, GFP_KERNEL);
598 if (error)
592 goto err_kill_bt; 599 goto err_kill_bt;
593 600
594 return 0; 601 return 0;
595 602
596err_kill_bt: 603err_kill_bt:
597 usb_kill_urb(dev->bt_urb); 604 usb_kill_urb(dev->bt_urb);
598error: 605err_reset_mode:
599 return -EIO; 606 bcm5974_wellspring_mode(dev, false);
607err_out:
608 return error;
600} 609}
601 610
602static void bcm5974_pause_traffic(struct bcm5974 *dev) 611static void bcm5974_pause_traffic(struct bcm5974 *dev)