aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/bcm5974.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 10:41:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 10:41:52 -0700
commitfe445c6e2cb62a566e1a89f8798de11459975710 (patch)
treedb1f2c0c19f488992fb5b9371476b4e7701c49a0 /drivers/input/mouse/bcm5974.c
parentMerge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 (diff)
parentMerge branch 'next' into for-linus (diff)
downloadlinux-dev-fe445c6e2cb62a566e1a89f8798de11459975710.tar.xz
linux-dev-fe445c6e2cb62a566e1a89f8798de11459975710.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits) Input: adp5588-keypad - fix NULL dereference in adp5588_gpio_add() Input: cy8ctmg110 - capacitive touchscreen support Input: keyboard - also match braille-only keyboards Input: adp5588-keys - export unused GPIO pins Input: xpad - add product ID for Hori Fighting Stick EX2 Input: adxl34x - fix leak and use after free Input: samsung-keypad - Add samsung keypad driver Input: i8042 - reset keyboard controller wehen resuming from S2R Input: synaptics - set min/max for finger width Input: synaptics - only report width on hardware that supports it Input: evdev - signal that device is writable in evdev_poll() Input: mousedev - signal that device is writable in mousedev_poll() Input: change input handlers to use bool when possible Input: document the MT event slot protocol Input: introduce MT event slots Input: usbtouchscreen - implement reset_resume Input: usbtouchscreen - implement runtime power management Input: usbtouchscreen - implement basic suspend/resume Input: Add ATMEL QT602240 touchscreen driver Input: fix signedness warning in input_set_keycode() ...
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 6dedded27222..ea67c49146a3 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,
__set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit);
__set_bit(BTN_TOOL_QUADTAP, input_dev->keybit);
__set_bit(BTN_LEFT, input_dev->keybit);
+
+ input_set_events_per_packet(input_dev, 60);
}
/* report button data as logical button state */
@@ -580,23 +582,30 @@ exit:
*/
static int bcm5974_start_traffic(struct bcm5974 *dev)
{
- if (bcm5974_wellspring_mode(dev, true)) {
+ int error;
+
+ error = bcm5974_wellspring_mode(dev, true);
+ if (error) {
dprintk(1, "bcm5974: mode switch failed\n");
- goto error;
+ goto err_out;
}
- if (usb_submit_urb(dev->bt_urb, GFP_KERNEL))
- goto error;
+ error = usb_submit_urb(dev->bt_urb, GFP_KERNEL);
+ if (error)
+ goto err_reset_mode;
- if (usb_submit_urb(dev->tp_urb, GFP_KERNEL))
+ error = usb_submit_urb(dev->tp_urb, GFP_KERNEL);
+ if (error)
goto err_kill_bt;
return 0;
err_kill_bt:
usb_kill_urb(dev->bt_urb);
-error:
- return -EIO;
+err_reset_mode:
+ bcm5974_wellspring_mode(dev, false);
+err_out:
+ return error;
}
static void bcm5974_pause_traffic(struct bcm5974 *dev)