summaryrefslogtreecommitdiff
path: root/drivers/hid/wacom_sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r--drivers/hid/wacom_sys.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index aaa9c84fd985..ca15c7f59dc7 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -1199,7 +1199,8 @@ static int wacom_register_inputs(struct wacom *wacom)
{
struct input_dev *input_dev, *pad_input_dev;
struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
- int error;
+ struct wacom_features *features = &wacom_wac->features;
+ int error = 0;
input_dev = wacom_wac->input;
pad_input_dev = wacom_wac->pad_input;
@@ -1207,7 +1208,10 @@ static int wacom_register_inputs(struct wacom *wacom)
if (!input_dev || !pad_input_dev)
return -EINVAL;
- error = wacom_setup_pentouch_input_capabilities(input_dev, wacom_wac);
+ if (features->device_type & WACOM_DEVICETYPE_PEN)
+ error = wacom_setup_pen_input_capabilities(input_dev, wacom_wac);
+ if (!error && features->device_type & WACOM_DEVICETYPE_TOUCH)
+ error = wacom_setup_touch_input_capabilities(input_dev, wacom_wac);
if (!error) {
error = input_register_device(input_dev);
if (error)