提交 3dc9f40d 编写于 作者: C Chris Bagwell 提交者: Dmitry Torokhov

Input: wacom - request tablet data for Bamboo Pens

Bamboo P&T need to use second form of usb_set_report() to
ask to report tablet data.

With previous addition of Bamboo Touch, BTN_TOOL_TRIPLETAP is now used
for both TABLETPC2FG and BAMBOO_PT types.  So reduced check to
match type=TABLETPC2FG.

This change shows redundant check for !TABLETPC2FG in else statement.
Signed-off-by: NChris Bagwell <chris@cnpbagwell.com>
Acked-by: NPing Cheng <pingc@wacom.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 a0bf0ea8
......@@ -319,8 +319,9 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
if (!rep_data)
return error;
/* ask to report tablet data if it is 2FGT or not a Tablet PC */
if (features->device_type == BTN_TOOL_TRIPLETAP) {
/* ask to report tablet data if it is 2FGT Tablet PC or
* not a Tablet PC */
if (features->type == TABLETPC2FG) {
do {
rep_data[0] = 3;
rep_data[1] = 4;
......@@ -332,7 +333,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
WAC_HID_FEATURE_REPORT, report_id,
rep_data, 3);
} while ((error < 0 || rep_data[1] != 4) && limit++ < 5);
} else if (features->type != TABLETPC && features->type != TABLETPC2FG) {
} else if (features->type != TABLETPC) {
do {
rep_data[0] = 2;
rep_data[1] = 2;
......@@ -364,7 +365,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
features->pressure_fuzz = 0;
features->distance_fuzz = 0;
/* only Tablet PCs need to retrieve the info */
/* only Tablet PCs and Bamboo P&T need to retrieve the info */
if ((features->type != TABLETPC) && (features->type != TABLETPC2FG) &&
(features->type != BAMBOO_PT))
goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册