Skip to content

Commit ffa6206

Browse files
Matthias Benkmanndtor
authored andcommitted
Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON
When commit commit fff1011 ("Input: xpad - add X-Box Adaptive Profile button") was applied, one hunk ended up in the wrong function; move it to where it belongs. Fixes: fff1011 ("Input: xpad - add X-Box Adaptive Profile button") Signed-off-by: Matthias Benkmann <[email protected]> Link: https://lore.kernel.org/r/20230318162106.0aef4ba5@ninja Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 8a0432b commit ffa6206

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/input/joystick/xpad.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,9 +781,6 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *d
781781
input_report_key(dev, BTN_C, data[8]);
782782
input_report_key(dev, BTN_Z, data[9]);
783783

784-
/* Profile button has a value of 0-3, so it is reported as an axis */
785-
if (xpad->mapping & MAP_PROFILE_BUTTON)
786-
input_report_abs(dev, ABS_PROFILE, data[34]);
787784

788785
input_sync(dev);
789786
}
@@ -1061,6 +1058,10 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char
10611058
(__u16) le16_to_cpup((__le16 *)(data + 8)));
10621059
}
10631060

1061+
/* Profile button has a value of 0-3, so it is reported as an axis */
1062+
if (xpad->mapping & MAP_PROFILE_BUTTON)
1063+
input_report_abs(dev, ABS_PROFILE, data[34]);
1064+
10641065
/* paddle handling */
10651066
/* based on SDL's SDL_hidapi_xboxone.c */
10661067
if (xpad->mapping & MAP_PADDLES) {

0 commit comments

Comments
 (0)