From patchwork Mon Aug 28 21:15:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Armstrong Skomra X-Patchwork-Id: 9926181 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E199C60380 for ; Mon, 28 Aug 2017 21:15:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB18928417 for ; Mon, 28 Aug 2017 21:15:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF68E287C6; Mon, 28 Aug 2017 21:15:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FB9128417 for ; Mon, 28 Aug 2017 21:15:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751182AbdH1VP6 (ORCPT ); Mon, 28 Aug 2017 17:15:58 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35860 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbdH1VP5 (ORCPT ); Mon, 28 Aug 2017 17:15:57 -0400 Received: by mail-pf0-f196.google.com with SMTP id k3so1031314pfc.3; Mon, 28 Aug 2017 14:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=AwqP0JdyE8QCHR5ifdsvvNWuaUh99hKCm2Zsp8AErMA=; b=HvdJgqjJGK5y8QFF7dt5PxD47eEZEzTwN7tkwlGoHtbA05aaqihivxDP2QLhAB+s68 t+ragBJg6ZV5L1DJ8JwUFNRsdG1sK3HMbHLSMw3DK5Uv+zaFIMdLqQP2DUFd/3I8bWCF QUvGgpDIU7xQSp1B8vYFiysHhU61itxbuJD6os9K8GH5BiDBKeZNNYtAyW+Svd4c9lxO nl+xPzLYcZHTZN3fmws4Mm92Quhjv3zi0JuHxwJeg11+IrRHKIn+w6V9CaQsKymYguhn 0E3F1KSx8YwzIJksEgvaI7DkWnL5vhrCnJJYEqmj5i3IrV/3DZsimAeFZGntL3M68ulp 1Ysg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AwqP0JdyE8QCHR5ifdsvvNWuaUh99hKCm2Zsp8AErMA=; b=kEnmkEpElmXFMCwEYa2oFtFZkUWMIT50mcrFXgwf3mQcrNvJjVi4nYVCf4xW4lUWn9 /d+uAm/NC9wORQTGcb5hUH+/UrhCjx4K3TUg9xt2fqwjRDlYGo+3T7K1aJHHz6KrrGb+ raiFoigIBxa4Lx21SVfsBbWJzEI/XvCbXl2N4f8ZrExaCTkfSBZHBmevXWwLBuLFRPV1 aDwmJ6m1ZBT3S2c2ulehf/5zN5LYELALZcdVLyS4sM+s1mtmjZP4M50G3NrD7+itLdUM S3N3C9c7snc/1O5hGDw9GH9SVPvmTJ5oZ26wPC0sNsr6NMza6Vm8v/h2FON4ciiEgnk7 oXnQ== X-Gm-Message-State: AHYfb5iu3DFVr93oLJtLfWfXQElb3yKhCvWFgyQG04/M+q0GUMBkUIdn n7Yuu9KJ+MBgF6S5 X-Received: by 10.98.212.73 with SMTP id u9mr1873654pfl.328.1503954956237; Mon, 28 Aug 2017 14:15:56 -0700 (PDT) Received: from localhost.localdomain (75-175-124-205.ptld.qwest.net. [75.175.124.205]) by smtp.googlemail.com with ESMTPSA id s137sm1815126pgs.51.2017.08.28.14.15.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Aug 2017 14:15:55 -0700 (PDT) From: Aaron Armstrong Skomra To: linux-input@vger.kernel.org, pinglinux@gmail.com, killertofu@gmail.com, jkosina@suse.cz, benjamin.tissoires@redhat.com Cc: Aaron Armstrong Skomra , "stable # 4 . 9" , Aaron Armstrong Skomra Subject: [PATCH] HID: wacom: leds: Don't try to control the EKR's read-only LEDs Date: Mon, 28 Aug 2017 14:15:39 -0700 Message-Id: <1503954939-23470-1-git-send-email-skomra@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 ("HID: wacom: leds: dynamically allocate LED groups") Cc: stable # 4.9 Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Jason Gerecke --- drivers/hid/wacom_sys.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 838c1ebfffa9..db1f64dcb9ba 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -766,6 +766,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;