From: Matthias Benkmann <matthias.benkmann@gmail.com>
To: linux-input@vger.kernel.org
Cc: dmitry.torokhov@gmail.com, Nate Yocom <nate@yocom.org>,
hadess@hadess.net, benjamin.tissoires@redhat.com,
linux-kernel@vger.kernel.org, Pavel Rojtberg <rojtberg@gmail.com>
Subject: [PATCH v3] Fix incorrectly applied patch for MAP_PROFILE_BUTTON
Date: Sat, 18 Mar 2023 16:21:06 +0100 [thread overview]
Message-ID: <20230318162106.0aef4ba5@ninja> (raw)
In-Reply-To: <CAK4gqCCk7ipRbZ=LM8Nsj+nE2S6v6QN39ziYSr3d2NmVMHULYg@mail.gmail.com>
When the linked patch was applied,
one hunk ended up in the wrong function. This patch moves it to where
it probably belongs.
Link: https://lore.kernel.org/all/20220908173930.28940-6-nate@yocom.org/
Fixes: fff1011a26d6 (Input: xpad - add X-Box Adaptive Profile button)
Signed-off-by: Matthias Benkmann <matthias.benkmann@gmail.com>
---
drivers/input/joystick/xpad.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index f642ec8e92dd..29131f1a2f06 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -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) {
--
2.25.1
next prev parent reply other threads:[~2023-03-18 15:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-18 14:41 [PATCH v2] Fix incorrectly applied patch for MAP_PROFILE_BUTTON Matthias Benkmann
2023-03-18 15:21 ` Matthias Benkmann [this message]
2023-03-18 18:00 ` [PATCH v3] " Andi Shyti
2023-03-20 4:33 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230318162106.0aef4ba5@ninja \
--to=matthias.benkmann@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hadess@hadess.net \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nate@yocom.org \
--cc=rojtberg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).