mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 15:40:50 +00:00
HID: make Wacom modesetting failures non-fatal
With Wacom tablet mode-setting moved from userspace into kernel, we don't have to consider failures of device queries through the _raw callback as hard failure, as the driver can safely continue anyway. This is consistent with the current USB driver in wacom_sys.c Reported-by: Ping Cheng <pinglinux@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
f9ce7c283c
commit
342f31e84e
@ -181,6 +181,11 @@ static int wacom_probe(struct hid_device *hdev,
|
|||||||
goto err_free;
|
goto err_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note that if the raw queries fail, it's not a hard failure and it
|
||||||
|
* is safe to continue
|
||||||
|
*/
|
||||||
|
|
||||||
/* Set Wacom mode2 */
|
/* Set Wacom mode2 */
|
||||||
rep_data[0] = 0x03; rep_data[1] = 0x00;
|
rep_data[0] = 0x03; rep_data[1] = 0x00;
|
||||||
limit = 3;
|
limit = 3;
|
||||||
@ -188,10 +193,8 @@ static int wacom_probe(struct hid_device *hdev,
|
|||||||
ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
|
ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
|
||||||
HID_FEATURE_REPORT);
|
HID_FEATURE_REPORT);
|
||||||
} while (ret < 0 && limit-- > 0);
|
} while (ret < 0 && limit-- > 0);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
dev_err(&hdev->dev, "failed to poke device #1, %d\n", ret);
|
dev_warn(&hdev->dev, "failed to poke device #1, %d\n", ret);
|
||||||
goto err_free;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 0x06 - high reporting speed, 0x05 - low speed */
|
/* 0x06 - high reporting speed, 0x05 - low speed */
|
||||||
rep_data[0] = 0x06; rep_data[1] = 0x00;
|
rep_data[0] = 0x06; rep_data[1] = 0x00;
|
||||||
@ -200,10 +203,8 @@ static int wacom_probe(struct hid_device *hdev,
|
|||||||
ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
|
ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
|
||||||
HID_FEATURE_REPORT);
|
HID_FEATURE_REPORT);
|
||||||
} while (ret < 0 && limit-- > 0);
|
} while (ret < 0 && limit-- > 0);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
dev_err(&hdev->dev, "failed to poke device #2, %d\n", ret);
|
dev_warn(&hdev->dev, "failed to poke device #2, %d\n", ret);
|
||||||
goto err_free;
|
|
||||||
}
|
|
||||||
|
|
||||||
hidinput = list_entry(hdev->inputs.next, struct hid_input, list);
|
hidinput = list_entry(hdev->inputs.next, struct hid_input, list);
|
||||||
input = hidinput->input;
|
input = hidinput->input;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user