]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.13.6/hid-wacom-leds-don-t-try-to-control-the-ekr-s-read-only-leds.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.13.6 / hid-wacom-leds-don-t-try-to-control-the-ekr-s-read-only-leds.patch
CommitLineData
13e6d7ac
GKH
1From 74aebed6dc13425233f2224668353cff7a112776 Mon Sep 17 00:00:00 2001
2From: Aaron Armstrong Skomra <skomra@gmail.com>
3Date: Mon, 28 Aug 2017 14:15:39 -0700
4Subject: HID: wacom: leds: Don't try to control the EKR's read-only LEDs
5
6From: Aaron Armstrong Skomra <skomra@gmail.com>
7
8commit 74aebed6dc13425233f2224668353cff7a112776 upstream.
9
10Commit a50aac7193f1 introduces 'led.groups' and adds EKR support
11for these groups. However, unlike the other devices with LEDs,
12the EKR's LEDs are read-only and we shouldn't attempt to control
13them in wacom_led_control().
14
15See bug: https://sourceforge.net/p/linuxwacom/bugs/342/
16
17Fixes: a50aac7193f1 ("HID: wacom: leds: dynamically allocate LED groups")
18Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
19Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
20Signed-off-by: Jiri Kosina <jkosina@suse.cz>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23---
24 drivers/hid/wacom_sys.c | 3 +++
25 1 file changed, 3 insertions(+)
26
27--- a/drivers/hid/wacom_sys.c
28+++ b/drivers/hid/wacom_sys.c
29@@ -766,6 +766,9 @@ static int wacom_led_control(struct waco
30 if (!wacom->led.groups)
31 return -ENOTSUPP;
32
33+ if (wacom->wacom_wac.features.type == REMOTE)
34+ return -ENOTSUPP;
35+
36 if (wacom->wacom_wac.pid) { /* wireless connected */
37 report_id = WAC_CMD_WL_LED_CONTROL;
38 buf_size = 13;