OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
HID: make .raw_request mandatory
[sagit-ice-cold/kernel_xiaomi_msm8998.git]
/
drivers
/
hid
/
hid-core.c
diff --git
a/drivers/hid/hid-core.c
b/drivers/hid/hid-core.c
index
b6ae697
..
0b57bab
100644
(file)
--- a/
drivers/hid/hid-core.c
+++ b/
drivers/hid/hid-core.c
@@
-1330,9
+1330,6
@@
void __hid_request(struct hid_device *hid, struct hid_report *report,
int ret;
int len;
int ret;
int len;
- if (!hid->ll_driver->raw_request)
- return;
-
buf = hid_alloc_report_buf(report, GFP_KERNEL);
if (!buf)
return;
buf = hid_alloc_report_buf(report, GFP_KERNEL);
if (!buf)
return;
@@
-2472,6
+2469,14
@@
int hid_add_device(struct hid_device *hdev)
return -ENODEV;
/*
return -ENODEV;
/*
+ * Check for the mandatory transport channel.
+ */
+ if (!hdev->ll_driver->raw_request) {
+ hid_err(hdev, "transport driver missing .raw_request()\n");
+ return -EINVAL;
+ }
+
+ /*
* Read the device report descriptor once and use as template
* for the driver-specific modifications.
*/
* Read the device report descriptor once and use as template
* for the driver-specific modifications.
*/