diff options
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/wacom_sys.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index a8b7f16f76fa..25086287957e 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c | |||
@@ -110,12 +110,24 @@ static void wacom_feature_mapping(struct hid_device *hdev, | |||
110 | { | 110 | { |
111 | struct wacom *wacom = hid_get_drvdata(hdev); | 111 | struct wacom *wacom = hid_get_drvdata(hdev); |
112 | struct wacom_features *features = &wacom->wacom_wac.features; | 112 | struct wacom_features *features = &wacom->wacom_wac.features; |
113 | u8 *data; | ||
114 | int ret; | ||
113 | 115 | ||
114 | switch (usage->hid) { | 116 | switch (usage->hid) { |
115 | case HID_DG_CONTACTMAX: | 117 | case HID_DG_CONTACTMAX: |
116 | /* leave touch_max as is if predefined */ | 118 | /* leave touch_max as is if predefined */ |
117 | if (!features->touch_max) | 119 | if (!features->touch_max) { |
118 | features->touch_max = field->value[0]; | 120 | /* read manually */ |
121 | data = kzalloc(2, GFP_KERNEL); | ||
122 | if (!data) | ||
123 | break; | ||
124 | data[0] = field->report->id; | ||
125 | ret = wacom_get_report(hdev, HID_FEATURE_REPORT, | ||
126 | data, 2, 0); | ||
127 | if (ret == 2) | ||
128 | features->touch_max = data[1]; | ||
129 | kfree(data); | ||
130 | } | ||
119 | break; | 131 | break; |
120 | } | 132 | } |
121 | } | 133 | } |
@@ -1280,6 +1292,8 @@ static int wacom_probe(struct hid_device *hdev, | |||
1280 | if (!id->driver_data) | 1292 | if (!id->driver_data) |
1281 | return -EINVAL; | 1293 | return -EINVAL; |
1282 | 1294 | ||
1295 | hdev->quirks |= HID_QUIRK_NO_INIT_REPORTS; | ||
1296 | |||
1283 | wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL); | 1297 | wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL); |
1284 | if (!wacom) | 1298 | if (!wacom) |
1285 | return -ENOMEM; | 1299 | return -ENOMEM; |