diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-05-25 01:51:34 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2020-06-16 17:34:14 +0200 |
commit | 6363d2065cd399cf9d6dc9d08c437f8658831100 (patch) | |
tree | c09e18e55c07c5b8468ab28182a5b3956546f116 /drivers/hid | |
parent | HID: alps: support devices with report id 2 (diff) | |
download | linux-6363d2065cd399cf9d6dc9d08c437f8658831100.tar.xz linux-6363d2065cd399cf9d6dc9d08c437f8658831100.zip |
HID: magicmouse: do not set up autorepeat
Neither the trackpad, nor the mouse want input core to generate autorepeat
events for their buttons, so let's reset the bit (as hid-input sets it for
these devices based on the usage vendor code).
Cc: stable@vger.kernel.org
Reported-by: Yariv <oigevald+kernel@gmail.com>
Tested-by: Yariv <oigevald+kernel@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-magicmouse.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 34138667f8af..abd86903875f 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c @@ -535,6 +535,12 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd __set_bit(MSC_RAW, input->mscbit); } + /* + * hid-input may mark device as using autorepeat, but neither + * the trackpad, nor the mouse actually want it. + */ + __clear_bit(EV_REP, input->evbit); + return 0; } |