[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170410164206.443375521@linuxfoundation.org>
Date: Mon, 10 Apr 2017 18:43:25 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Ping Cheng <ping.cheng@...om.com>,
Jason Gerecke <jason.gerecke@...om.com>,
Jiri Kosina <jkosina@...e.cz>,
Sasha Levin <alexander.levin@...izon.com>
Subject: [PATCH 4.10 094/110] HID: wacom: dont apply generic settings to old devices
4.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ping Cheng <pinglinux@...il.com>
[ Upstream commit e7deb1570a527d3c74be4e21a72b1b459605c501 ]
Non-generic devices have numbered_buttons set for both pen and
touch interfaces by default. The actual number of buttons on the
interface is normally manually decided later, which is different
from what those HID generic devices are processed, where number
of buttons are directly retrieved from HID descriptors.
This patch adds the missed HID_GENERIC check and moves the statement
to wacom_setup_pad_input_capabilities since it's not a quirk anymore.
Signed-off-by: Ping Cheng <ping.cheng@...om.com>
Reviewed-by: Jason Gerecke <jason.gerecke@...om.com>
Signed-off-by: Jiri Kosina <jkosina@...e.cz>
Signed-off-by: Sasha Levin <alexander.levin@...izon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/hid/wacom_wac.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -3290,6 +3290,9 @@ int wacom_setup_pad_input_capabilities(s
{
struct wacom_features *features = &wacom_wac->features;
+ if ((features->type == HID_GENERIC) && features->numbered_buttons > 0)
+ features->device_type |= WACOM_DEVICETYPE_PAD;
+
if (!(features->device_type & WACOM_DEVICETYPE_PAD))
return -ENODEV;
Powered by blists - more mailing lists