diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2010-02-03 09:52:31 -0500 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2010-02-03 09:52:31 -0500 |
| commit | 342f31e84eec9002b75f6fcdec6bd932ac77a390 (patch) | |
| tree | c517d020958de4c1088d339f2f9731580854a1fa | |
| parent | f9ce7c283c16538955d5d094101889792bcde109 (diff) | |
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>
| -rw-r--r-- | drivers/hid/hid-wacom.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index b8778db720bc..8d3b46f5d149 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c | |||
| @@ -181,6 +181,11 @@ static int wacom_probe(struct hid_device *hdev, | |||
| 181 | goto err_free; | 181 | goto err_free; |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | /* | ||
| 185 | * Note that if the raw queries fail, it's not a hard failure and it | ||
| 186 | * is safe to continue | ||
| 187 | */ | ||
| 188 | |||
| 184 | /* Set Wacom mode2 */ | 189 | /* Set Wacom mode2 */ |
| 185 | rep_data[0] = 0x03; rep_data[1] = 0x00; | 190 | rep_data[0] = 0x03; rep_data[1] = 0x00; |
| 186 | limit = 3; | 191 | limit = 3; |
| @@ -188,10 +193,8 @@ static int wacom_probe(struct hid_device *hdev, | |||
| 188 | ret = hdev->hid_output_raw_report(hdev, rep_data, 2, | 193 | ret = hdev->hid_output_raw_report(hdev, rep_data, 2, |
| 189 | HID_FEATURE_REPORT); | 194 | HID_FEATURE_REPORT); |
| 190 | } while (ret < 0 && limit-- > 0); | 195 | } while (ret < 0 && limit-- > 0); |
| 191 | if (ret < 0) { | 196 | if (ret < 0) |
| 192 | dev_err(&hdev->dev, "failed to poke device #1, %d\n", ret); | 197 | dev_warn(&hdev->dev, "failed to poke device #1, %d\n", ret); |
| 193 | goto err_free; | ||
| 194 | } | ||
| 195 | 198 | ||
| 196 | /* 0x06 - high reporting speed, 0x05 - low speed */ | 199 | /* 0x06 - high reporting speed, 0x05 - low speed */ |
| 197 | rep_data[0] = 0x06; rep_data[1] = 0x00; | 200 | rep_data[0] = 0x06; rep_data[1] = 0x00; |
| @@ -200,10 +203,8 @@ static int wacom_probe(struct hid_device *hdev, | |||
| 200 | ret = hdev->hid_output_raw_report(hdev, rep_data, 2, | 203 | ret = hdev->hid_output_raw_report(hdev, rep_data, 2, |
| 201 | HID_FEATURE_REPORT); | 204 | HID_FEATURE_REPORT); |
| 202 | } while (ret < 0 && limit-- > 0); | 205 | } while (ret < 0 && limit-- > 0); |
| 203 | if (ret < 0) { | 206 | if (ret < 0) |
| 204 | dev_err(&hdev->dev, "failed to poke device #2, %d\n", ret); | 207 | dev_warn(&hdev->dev, "failed to poke device #2, %d\n", ret); |
| 205 | goto err_free; | ||
| 206 | } | ||
| 207 | 208 | ||
| 208 | hidinput = list_entry(hdev->inputs.next, struct hid_input, list); | 209 | hidinput = list_entry(hdev->inputs.next, struct hid_input, list); |
| 209 | input = hidinput->input; | 210 | input = hidinput->input; |
