Patch "HID: hid-input: fix stylus battery reporting" has been added to the 4.19-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

    HID: hid-input: fix stylus battery reporting

to the 4.19-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:
     hid-hid-input-fix-stylus-battery-reporting.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 8cba88c32c9ca6c5a43bf698acd6a5e0e048c1fe
Author: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Date:   Fri Sep 25 16:35:52 2020 -0700

    HID: hid-input: fix stylus battery reporting
    
    [ Upstream commit 505f394fa239cecb76d916aa858f87ed7ea7fde4 ]
    
    With commit 4f3882177240 hid-input started clearing of "ignored" usages
    to avoid using garbage that might have been left in them. However
    "battery strength" usages should not be ignored, as we do want to
    use them.
    
    Fixes: 4f3882177240 ("HID: hid-input: clear unmapped usages")
    Reported-by: Kenneth Albanowski <kenalba@xxxxxxxxxx>
    Tested-by: Kenneth Albanowski <kenalba@xxxxxxxxxx>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
    Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index a9da1526c40ae..11bd2ca22a2e6 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -796,7 +796,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 		case 0x3b: /* Battery Strength */
 			hidinput_setup_battery(device, HID_INPUT_REPORT, field);
 			usage->type = EV_PWR;
-			goto ignore;
+			return;
 
 		case 0x3c: /* Invert */
 			map_key_clear(BTN_TOOL_RUBBER);
@@ -1052,7 +1052,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 		case HID_DC_BATTERYSTRENGTH:
 			hidinput_setup_battery(device, HID_INPUT_REPORT, field);
 			usage->type = EV_PWR;
-			goto ignore;
+			return;
 		}
 		goto unknown;
 



[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