diff options
| -rw-r--r-- | drivers/hid/uhid.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 8f5e46b1bb46..8bf613e3783d 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c | |||
| @@ -203,6 +203,21 @@ unlock: | |||
| 203 | return ret ? ret : len; | 203 | return ret ? ret : len; |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | static int uhid_hid_raw_request(struct hid_device *hid, unsigned char reportnum, | ||
| 207 | __u8 *buf, size_t len, unsigned char rtype, | ||
| 208 | int reqtype) | ||
| 209 | { | ||
| 210 | switch (reqtype) { | ||
| 211 | case HID_REQ_GET_REPORT: | ||
| 212 | return uhid_hid_get_report(hid, reportnum, buf, len, rtype); | ||
| 213 | case HID_REQ_SET_REPORT: | ||
| 214 | /* TODO: implement proper SET_REPORT functionality */ | ||
| 215 | return -ENOSYS; | ||
| 216 | default: | ||
| 217 | return -EIO; | ||
| 218 | } | ||
| 219 | } | ||
| 220 | |||
| 206 | static int uhid_hid_output_raw(struct hid_device *hid, __u8 *buf, size_t count, | 221 | static int uhid_hid_output_raw(struct hid_device *hid, __u8 *buf, size_t count, |
| 207 | unsigned char report_type) | 222 | unsigned char report_type) |
| 208 | { | 223 | { |
| @@ -247,29 +262,14 @@ static int uhid_hid_output_report(struct hid_device *hid, __u8 *buf, | |||
| 247 | return uhid_hid_output_raw(hid, buf, count, HID_OUTPUT_REPORT); | 262 | return uhid_hid_output_raw(hid, buf, count, HID_OUTPUT_REPORT); |
| 248 | } | 263 | } |
| 249 | 264 | ||
| 250 | static int uhid_raw_request(struct hid_device *hid, unsigned char reportnum, | ||
| 251 | __u8 *buf, size_t len, unsigned char rtype, | ||
| 252 | int reqtype) | ||
| 253 | { | ||
| 254 | switch (reqtype) { | ||
| 255 | case HID_REQ_GET_REPORT: | ||
| 256 | return uhid_hid_get_report(hid, reportnum, buf, len, rtype); | ||
| 257 | case HID_REQ_SET_REPORT: | ||
| 258 | /* TODO: implement proper SET_REPORT functionality */ | ||
| 259 | return -ENOSYS; | ||
| 260 | default: | ||
| 261 | return -EIO; | ||
| 262 | } | ||
| 263 | } | ||
| 264 | |||
| 265 | static struct hid_ll_driver uhid_hid_driver = { | 265 | static struct hid_ll_driver uhid_hid_driver = { |
| 266 | .start = uhid_hid_start, | 266 | .start = uhid_hid_start, |
| 267 | .stop = uhid_hid_stop, | 267 | .stop = uhid_hid_stop, |
| 268 | .open = uhid_hid_open, | 268 | .open = uhid_hid_open, |
| 269 | .close = uhid_hid_close, | 269 | .close = uhid_hid_close, |
| 270 | .parse = uhid_hid_parse, | 270 | .parse = uhid_hid_parse, |
| 271 | .raw_request = uhid_hid_raw_request, | ||
| 271 | .output_report = uhid_hid_output_report, | 272 | .output_report = uhid_hid_output_report, |
| 272 | .raw_request = uhid_raw_request, | ||
| 273 | }; | 273 | }; |
| 274 | 274 | ||
| 275 | #ifdef CONFIG_COMPAT | 275 | #ifdef CONFIG_COMPAT |
