mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON
[ Upstream commitffa6206ebf
] When commit commitfff1011a26
("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:fff1011a26
("Input: xpad - add X-Box Adaptive Profile button") Signed-off-by: Matthias Benkmann <matthias.benkmann@gmail.com> Link: https://lore.kernel.org/r/20230318162106.0aef4ba5@ninja Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
13a8c8a09a
commit
19176d30b7
1 changed files with 4 additions and 3 deletions
|
@ -779,9 +779,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);
|
||||
}
|
||||
|
@ -1059,6 +1056,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) {
|
||||
|
|
Loading…
Reference in a new issue