From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f194.google.com ([209.85.220.194]:37345 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbdIUQZO (ORCPT ); Thu, 21 Sep 2017 12:25:14 -0400 Received: by mail-qk0-f194.google.com with SMTP id r66so3928523qke.4 for ; Thu, 21 Sep 2017 09:25:13 -0700 (PDT) From: Jason Gerecke To: linuxwacom-devel@lists.sourceforge.net Cc: Ping Cheng , Aaron Skomra , stable Subject: [PATCH input-wacom 02/10] backport: HID: wacom: leds: Don't try to control the EKR's read-only LEDs Date: Thu, 21 Sep 2017 09:25:00 -0700 Message-Id: <20170921162508.12492-2-killertofu@gmail.com> In-Reply-To: <20170921162508.12492-1-killertofu@gmail.com> References: <20170921162508.12492-1-killertofu@gmail.com> Sender: stable-owner@vger.kernel.org List-ID: From: Aaron Armstrong Skomra Commit a50aac7193f1 introduces 'led.groups' and adds EKR support for these groups. However, unlike the other devices with LEDs, the EKR's LEDs are read-only and we shouldn't attempt to control them in wacom_led_control(). See bug: https://sourceforge.net/p/linuxwacom/bugs/342/ Fixes: a50aac7193f1 ("backport: HID: wacom: leds: dynamically allocate LED groups") Cc: stable # 4.9 Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina [jason.gerecke@wacom.com: Imported into input-wacom repository (74aebed6dc)] Signed-off-by: Jason Gerecke [jason.gerecke@wacom.com: Backported from input-wacom repository (7a69536)] Signed-off-by: Jason Gerecke --- 3.17/wacom_sys.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/3.17/wacom_sys.c b/3.17/wacom_sys.c index 2996d0d..8fd0b78 100644 --- a/3.17/wacom_sys.c +++ b/3.17/wacom_sys.c @@ -794,6 +794,9 @@ static int wacom_led_control(struct wacom *wacom) if (!wacom->led.groups) return -ENOTSUPP; + if (wacom->wacom_wac.features.type == REMOTE) + return -ENOTSUPP; + if (wacom->wacom_wac.pid) { /* wireless connected */ report_id = WAC_CMD_WL_LED_CONTROL; buf_size = 13; -- 2.14.1