diff options
author | Kenneth Kwak <kkwak@nvidia.com> | 2014-06-24 21:35:12 -0700 |
---|---|---|
committer | Peter Kim <pekim@nvidia.com> | 2014-06-25 19:10:43 -0700 |
commit | 45619115cebae2d5f3344a08476a1e09ea031c75 (patch) | |
tree | 8e9ecf5887ba88b32a795bb769736ef0c4df3c2c /include | |
parent | 4f1670a121947f137aeabf9fd194494e16957b06 (diff) |
Revert "HID: Handle driver-specific device descriptor in core"
DO NOT INTEGRATE
Bug 1466757
This reverts commit 37ad3e3e97d734e74e071bf5e8796b22e16814e4.
Change-Id: I709cd76ccc70aee7d768ace2463b85049cc420f3
Signed-off-by: Kenneth Kwak <kkwak@nvidia.com>
Reviewed-on: http://git-master/r/428074
Reviewed-by: Peter Kim <pekim@nvidia.com>
Tested-by: Peter Kim <pekim@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hid.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index f1d71d5ce106..944e21cfc4d6 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -467,8 +467,6 @@ struct hid_driver; struct hid_ll_driver; struct hid_device { /* device report descriptor */ - __u8 *dev_rdesc; - unsigned dev_rsize; __u8 *rdesc; unsigned rsize; struct hid_collection *collection; /* List of HID collections */ @@ -747,7 +745,6 @@ void hid_output_report(struct hid_report *report, __u8 *data); struct hid_device *hid_allocate_device(void); struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size); -int hid_open_report(struct hid_device *device); int hid_check_keys_pressed(struct hid_device *hid); int hid_connect(struct hid_device *hid, unsigned int connect_mask); void hid_disconnect(struct hid_device *hid); @@ -818,7 +815,16 @@ static inline void hid_map_usage_clear(struct hid_input *hidinput, */ static inline int __must_check hid_parse(struct hid_device *hdev) { - return hid_open_report(hdev); + int ret; + + if (hdev->status & HID_STAT_PARSED) + return 0; + + ret = hdev->ll_driver->parse(hdev); + if (!ret) + hdev->status |= HID_STAT_PARSED; + + return ret; } /** |