summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-magicmouse.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-25 10:03:13 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-25 10:03:13 (GMT)
commit31dced41c6822ce751c033a53502ea4d8d399422 (patch)
tree53f6abc56c517a6dcb790bf9b3a71ac42694233a /drivers/hid/hid-magicmouse.c
parent7c1953ddb609f1c161bf4a11a5e4e4577e82e557 (diff)
parentb3aec7b686329e6bb65aa08c7f9458f7fd512f06 (diff)
downloadlinux-31dced41c6822ce751c033a53502ea4d8d399422.tar.xz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (61 commits) HID: hid-magicmouse: Magic Trackpad has 1 button, not 2 HID: Add device IDs for more SJOY adapters HID: primax: remove spurious dependency HID: support primax keyboards violating USB HID spec HID: usbhid: cancel timer for retry synchronously HID: wacom: Set input bits before registration HID: consolidate MacbookAir 4,1 mappings HID: MacbookAir4,1 and MacbookAir4,2 need entry in hid_mouse_ignore_list[] HID: Add support MacbookAir 4,1 keyboard HID: hidraw: open count should not increase if error HID: hiddev: potential info leak in hiddev_ioctl() HID: multitouch: decide if hid-multitouch needs to handle mt devices HID: add autodetection of multitouch devices HID: "hid-logitech" driver with Logitech Driving Force GT HID: hid-logitech-dj: fix off by one HID: hidraw: protect hidraw_disconnect() better HID: hid-multitouch: add support for the IDEACOM 6650 chip HID: Add full support for Logitech Unifying receivers HID: hidraw: free list for all error in hidraw_open HID: roccat: Kone now reports external profile changes via roccat device ...
Diffstat (limited to 'drivers/hid/hid-magicmouse.c')
-rw-r--r--drivers/hid/hid-magicmouse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index f0fbd7b..2ab7175 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -405,6 +405,13 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h
__set_bit(REL_HWHEEL, input->relbit);
}
} else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
+ /* input->keybit is initialized with incorrect button info
+ * for Magic Trackpad. There really is only one physical
+ * button (BTN_LEFT == BTN_MOUSE). Make sure we don't
+ * advertise buttons that don't exist...
+ */
+ __clear_bit(BTN_RIGHT, input->keybit);
+ __clear_bit(BTN_MIDDLE, input->keybit);
__set_bit(BTN_MOUSE, input->keybit);
__set_bit(BTN_TOOL_FINGER, input->keybit);
__set_bit(BTN_TOOL_DOUBLETAP, input->keybit);