Skip to content

Commit

Permalink
HID: magicmouse: do not set up autorepeat
Browse files Browse the repository at this point in the history
commit 6363d2065cd399cf9d6dc9d08c437f8658831100 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
dtor authored and gregkh committed Jul 22, 2020
1 parent e0c31e9 commit 55500dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/hid/hid-magicmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,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;
}

Expand Down

0 comments on commit 55500dd

Please sign in to comment.