Patch "Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     input-xpad-fix-incorrectly-applied-patch-for-map_pro.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 422a5858488848511c90adfa1779056d9bdcccf8
Author: Matthias Benkmann <matthias.benkmann@xxxxxxxxx>
Date:   Sun Mar 19 21:30:15 2023 -0700

    Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON
    
    [ Upstream commit ffa6206ebf8d39e83d87ac226df68dbbe155819a ]
    
    When commit commit fff1011a26d6 ("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: fff1011a26d6 ("Input: xpad - add X-Box Adaptive Profile button")
    Signed-off-by: Matthias Benkmann <matthias.benkmann@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230318162106.0aef4ba5@ninja
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 2959d80f7fdb6..cd36cf7165423 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -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) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux