summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-magicmouse.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2011-01-08 01:08:19 +0100
committerJiri Kosina <jkosina@suse.cz>2011-01-08 01:08:19 +0100
commita7153258b70ccbe3922fcee9ca4271d4f4c2bc55 (patch)
tree12e17027af36846933908da64a1419491ea58676 /drivers/hid/hid-magicmouse.c
parentHID: hidraw: add compatibility ioctl() for 32-bit applications. (diff)
parentHID: hid-picolcd: Fix memory leak in picolcd_debug_out_report() (diff)
downloadlinux-a7153258b70ccbe3922fcee9ca4271d4f4c2bc55.tar.xz
linux-a7153258b70ccbe3922fcee9ca4271d4f4c2bc55.zip
Merge branches 'upstream' and 'upstream-fixes' into for-linus
Diffstat (limited to 'drivers/hid/hid-magicmouse.c')
-rw-r--r--drivers/hid/hid-magicmouse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 11306b3d9c56..698e6459fd0b 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -435,6 +435,11 @@ static int magicmouse_input_mapping(struct hid_device *hdev,
if (!msc->input)
msc->input = hi->input;
+ /* Magic Trackpad does not give relative data after switching to MT */
+ if (hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD &&
+ field->flags & HID_MAIN_ITEM_RELATIVE)
+ return -1;
+
return 0;
}