aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/joystick/xpad.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 39cc52f9ef92..ca62a6e11846 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -457,6 +457,10 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *d
457static void xpad360_process_packet(struct usb_xpad *xpad, struct input_dev *dev, 457static void xpad360_process_packet(struct usb_xpad *xpad, struct input_dev *dev,
458 u16 cmd, unsigned char *data) 458 u16 cmd, unsigned char *data)
459{ 459{
460 /* valid pad data */
461 if (data[0] != 0x00)
462 return;
463
460 /* digital pad */ 464 /* digital pad */
461 if (xpad->mapping & MAP_DPAD_TO_BUTTONS) { 465 if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
462 /* dpad as buttons (left, right, up, down) */ 466 /* dpad as buttons (left, right, up, down) */