]> git.baikalelectronics.ru Git - kernel.git/commit
Input: wacom - fix mousewheel handling for old wacom tablets
authorMike Auty <ikelos@gentoo.org>
Sun, 29 Aug 2010 03:35:17 +0000 (20:35 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 29 Aug 2010 04:39:04 +0000 (21:39 -0700)
commitbf31bb92b414df4557099d6f34713b2cae7137e5
tree46b580076157077f0074666db4863815390cc991
parent78b6273443a1e0f915d75daabf86433df158a48d
Input: wacom - fix mousewheel handling for old wacom tablets

This fixes a regression introduced in
31880f8bd09c721eed1dd14d9ec9de48152c6a57.

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: Mike Auty <ikelos@gentoo.org>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Cc; stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/tablet/wacom_wac.c