Skip to content
Commit d9f66c1a authored by Mike Auty's avatar Mike Auty Committed by Dmitry Torokhov
Browse files

Input: wacom - fix mousewheel handling for old wacom tablets



This fixes a regression introduced in
3b57ca0f.

The data[6] byte contains either 1 or -1 depending on the whether the
mouse wheel on older wacom tablets is moved down (1) or up (-1).  The
patch introduced in the above commit changed the cast from (signed char)
to (signed).  When cast as a signed integer and negated, the value of -1
(stored in the byte as 0xff) became -255 rather than 1.  This patch
reverts the cast to a (signed char) and also removes an unnecessary
(signed) cast, as all the values operated on are bitmasked.

Signed-off-by: default avatarMike Auty <ikelos@gentoo.org>
Reviewed-by: default avatarPing Cheng <pingc@wacom.com>
Cc; stable@kernel.org
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 288933c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment