mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
HID: wacom: don't apply generic settings to old devices
[ Upstream commit e7deb1570a ]
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@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
abb6408938
commit
703f48a1c3
@@ -2896,6 +2896,9 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
|
||||
{
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user