HID: wiimote: Fix IR data parser
authorDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 8 May 2012 14:52:31 +0000 (16:52 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 30 May 2012 23:43:38 +0000 (00:43 +0100)
commit3179153afbc6bd7ccc8c3044d5fb3a9a366736c9
treee2511488746627ee496ae60e17957e6340844ad0
parentdda7fe01795efdeba543d418dd15648ee74cf343
HID: wiimote: Fix IR data parser

commit 74b89e8a3625c17c7452532dfb997ac4f1a38751 upstream.

We incorrectly parse incoming IR data. The extra byte contains the upper
bits and not the lower bits of the x/y coordinates. User-space expects
absolute position data from us so this patch does not break existing
applications. On the contrary, it extends the virtual view and fixes
garbage reports for margin areas of the virtual screen.

Reported-by: Peter Bukovsky <bukovsky.peter@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/hid/hid-wiimote.c