Fix incorrectly applied patch for MAP_PROFILE_BUTTON
Subsystems (2)
PATCH v2 1/1 Fix incorrectly applied patch for MAP_PROFILE_BUTTON
When the linked patch was applied,
one hunk ended up in the wrong function. This patch moves it to where it probably belongs.
--- drivers/input/joystick/xpad.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/input/joystick/xpad.c +0 -0
@@ -781,9 +781,6 @@ static void xpad_process_packet(struct usb_xpad
*xpad, u16 cmd, unsigned char *d
input_report_key(dev, BTN_C, data[8]);
input_report_key(dev, BTN_Z, data[9]);- /* Profile button has a value of 0-3, so it is reported as an axis */
- if (xpad->mapping & MAP_PROFILE_BUTTON)
- input_report_abs(dev, ABS_PROFILE, data[34]);
input_sync(dev);
}
@@ -1061,6 +1058,10 @@ static void xpadone_process_packet(struct
usb_xpad *xpad, u16 cmd, unsigned char
(__u16) le16_to_cpup((__le16
*)(data + 8)));
}+ /* Profile button has a value of 0-3, so it is
reported as an axis */
+ if (xpad->mapping & MAP_PROFILE_BUTTON)
+ input_report_abs(dev, ABS_PROFILE, data[34]);
+
/* paddle handling */
/* based on SDL's SDL_hidapi_xboxone.c */
if (xpad->mapping & MAP_PADDLES) {Signature · 1 line
2.25.1
PATCH v3 1/1 Fix incorrectly applied patch for MAP_PROFILE_BUTTON
When the linked patch was applied,
one hunk ended up in the wrong function. This patch moves it to where it probably belongs.
--- drivers/input/joystick/xpad.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/input/joystick/xpad.c +4 -3
@@ -781,9 +781,6 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *dinput_report_key (dev,BTN_C , data[8 ]);input_report_key (dev,BTN_Z , data[9 ]); -/* Profile button has a value of 0-3, so it is reported as an axis */ -if (xpad->mapping &MAP_PROFILE_BUTTON ) -input_report_abs (dev,ABS_PROFILE , data[34 ]);input_sync (dev); }
@@ -1061,6 +1058,10 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char (__u16) le16_to_cpup((__le16 *)(data + 8))); } +/* Profile button has a value of 0-3, so it is reported as an axis */ +if (xpad->mapping &MAP_PROFILE_BUTTON ) +input_report_abs (dev,ABS_PROFILE , data[34 ]); +/* paddle handling */ /* based on SDL's SDL_hidapi_xboxone.c */ if (xpad->mapping &MAP_PADDLES ) {
Signature · 1 line
2.25.1
Quoted 1 line · Matthias Benkmann
When the linked patch was applied,
Please refer to the patch as "commit fff1011a26d6 ("Input: xpad - add X-Box Adaptive Profile button")" and not as "linked patch".
Quoted 2 lines
one hunk ended up in the wrong function. This patch moves it to where it probably belongs.
probably? We need to be sure here :)
Besides, please, use the imperative form, not "this patch moves" but "move what where", please be more specific.
Andi
Quoted 36 lines
Fixes fff1011a26d6 (Input: xpad - add X-Box Adaptive Profile button)Signed-off-by Matthias Benkmann <[email protected]>--- drivers/input/joystick/xpad.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/input/joystick/xpad.c +4
-3@@ -781,9 +781,6 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *dinput_report_key (dev,BTN_C , data[8 ]);input_report_key (dev,BTN_Z , data[9 ]); -/* Profile button has a value of 0-3, so it is reported as an axis */ -if (xpad->mapping &MAP_PROFILE_BUTTON ) -input_report_abs (dev,ABS_PROFILE , data[34 ]);input_sync (dev); }@@ -1061,6 +1058,10 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char (__u16) le16_to_cpup((__le16 *)(data + 8))); } +/* Profile button has a value of 0-3, so it is reported as an axis */ +if (xpad->mapping &MAP_PROFILE_BUTTON ) +input_report_abs (dev,ABS_PROFILE , data[34 ]); +/* paddle handling */ /* based on SDL's SDL_hidapi_xboxone.c */ if (xpad->mapping &MAP_PADDLES ) {Signature · 1 line
2.25.1
Dmitry Torokhov
maintainerQuoted 6 lines · Andi Shyti
Quoted 1 line · Matthias Benkmann
When the linked patch was applied,
Please refer to the patch as "commit
fff1011a26d6("Input: xpad - add X-Box Adaptive Profile button")" and not as "linked patch".
Quoted 7 lines
Quoted 2 lines
one hunk ended up in the wrong function. This patch moves it to where it probably belongs.
probably? We need to be sure here :)
Besides, please, use the imperative form, not "this patch moves" but "move what where", please be more specific.
Reworded and applied, thank you.
Signature · 1 line
Dmitry