mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
HID: hid-input: fix stylus battery reporting
[ Upstream commit505f394fa2
] With commit4f38821772
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:4f38821772
("HID: hid-input: clear unmapped usages") Reported-by: Kenneth Albanowski <kenalba@google.com> Tested-by: Kenneth Albanowski <kenalba@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d996dee5ff
commit
9fccdf4981
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
@ -1043,7 +1043,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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue