aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid/wacom_wac.c
diff options
context:
space:
mode:
authorAaron Armstrong Skomra <skomra@gmail.com>2019-05-10 15:31:16 -0700
committerJiri Kosina <jkosina@suse.cz>2019-05-17 13:56:06 +0200
commitd8e9806005f28bbb49899dab2068e3359e22ba35 (patch)
tree60614b16841db73d6dec1c99b9c271b35720398a /drivers/hid/wacom_wac.c
parentb4dd05dee0dbd16afdbba83b698a7110c687be2d (diff)
downloadlinux-d8e9806005f28bbb49899dab2068e3359e22ba35.tar.gz
HID: wacom: generic: only switch the mode on devices with LEDs
Currently, the driver will attempt to set the mode on all devices with a center button, but some devices with a center button lack LEDs, and attempting to set the LEDs on devices without LEDs results in the kernel error message of the form: "leds input8::wacom-0.1: Setting an LED's brightness failed (-32)" This is because the generic codepath erroneously assumes that the BUTTON_CENTER usage indicates that the device has LEDs, the previously ignored TOUCH_RING_SETTING usage is a more accurate indication of the existence of LEDs on the device. Fixes: 10c55cacb8b2 ("HID: wacom: generic: support LEDs") Cc: <stable@vger.kernel.org> # v4.11+ Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_wac.c')
-rw-r--r--drivers/hid/wacom_wac.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 747730d32ab6..62bf8ec6023e 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -1906,8 +1906,6 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev,
features->device_type |= WACOM_DEVICETYPE_PAD;
break;
case WACOM_HID_WD_BUTTONCENTER:
- wacom->generic_has_leds = true;
- /* fall through */
case WACOM_HID_WD_BUTTONHOME:
case WACOM_HID_WD_BUTTONUP:
case WACOM_HID_WD_BUTTONDOWN: