aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/joystick/xpad.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 6288c4f6e3a3..316d98755440 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -236,13 +236,13 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *d
236 input_report_abs(dev, ABS_X, 236 input_report_abs(dev, ABS_X,
237 (__s16) le16_to_cpup((__le16 *)(data + 12))); 237 (__s16) le16_to_cpup((__le16 *)(data + 12)));
238 input_report_abs(dev, ABS_Y, 238 input_report_abs(dev, ABS_Y,
239 (__s16) le16_to_cpup((__le16 *)(data + 14))); 239 ~(__s16) le16_to_cpup((__le16 *)(data + 14)));
240 240
241 /* right stick */ 241 /* right stick */
242 input_report_abs(dev, ABS_RX, 242 input_report_abs(dev, ABS_RX,
243 (__s16) le16_to_cpup((__le16 *)(data + 16))); 243 (__s16) le16_to_cpup((__le16 *)(data + 16)));
244 input_report_abs(dev, ABS_RY, 244 input_report_abs(dev, ABS_RY,
245 (__s16) le16_to_cpup((__le16 *)(data + 18))); 245 ~(__s16) le16_to_cpup((__le16 *)(data + 18)));
246 246
247 /* triggers left/right */ 247 /* triggers left/right */
248 input_report_abs(dev, ABS_Z, data[10]); 248 input_report_abs(dev, ABS_Z, data[10]);
@@ -330,13 +330,13 @@ static void xpad360_process_packet(struct usb_xpad *xpad,
330 input_report_abs(dev, ABS_X, 330 input_report_abs(dev, ABS_X,
331 (__s16) le16_to_cpup((__le16 *)(data + 6))); 331 (__s16) le16_to_cpup((__le16 *)(data + 6)));
332 input_report_abs(dev, ABS_Y, 332 input_report_abs(dev, ABS_Y,
333 (__s16) le16_to_cpup((__le16 *)(data + 8))); 333 ~(__s16) le16_to_cpup((__le16 *)(data + 8)));
334 334
335 /* right stick */ 335 /* right stick */
336 input_report_abs(dev, ABS_RX, 336 input_report_abs(dev, ABS_RX,
337 (__s16) le16_to_cpup((__le16 *)(data + 10))); 337 (__s16) le16_to_cpup((__le16 *)(data + 10)));
338 input_report_abs(dev, ABS_RY, 338 input_report_abs(dev, ABS_RY,
339 (__s16) le16_to_cpup((__le16 *)(data + 12))); 339 ~(__s16) le16_to_cpup((__le16 *)(data + 12)));
340 340
341 /* triggers left/right */ 341 /* triggers left/right */
342 input_report_abs(dev, ABS_Z, data[4]); 342 input_report_abs(dev, ABS_Z, data[4]);