diff options
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r-- | include/linux/hid.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 3a95da60fd3e..d8e7cc7f894f 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -467,6 +467,8 @@ struct hid_driver; | |||
467 | struct hid_ll_driver; | 467 | struct hid_ll_driver; |
468 | 468 | ||
469 | struct hid_device { /* device report descriptor */ | 469 | struct hid_device { /* device report descriptor */ |
470 | __u8 *dev_rdesc; | ||
471 | unsigned dev_rsize; | ||
470 | __u8 *rdesc; | 472 | __u8 *rdesc; |
471 | unsigned rsize; | 473 | unsigned rsize; |
472 | struct hid_collection *collection; /* List of HID collections */ | 474 | struct hid_collection *collection; /* List of HID collections */ |
@@ -735,6 +737,7 @@ void hid_output_report(struct hid_report *report, __u8 *data); | |||
735 | struct hid_device *hid_allocate_device(void); | 737 | struct hid_device *hid_allocate_device(void); |
736 | struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); | 738 | struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); |
737 | int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size); | 739 | int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size); |
740 | int hid_open_report(struct hid_device *device); | ||
738 | int hid_check_keys_pressed(struct hid_device *hid); | 741 | int hid_check_keys_pressed(struct hid_device *hid); |
739 | int hid_connect(struct hid_device *hid, unsigned int connect_mask); | 742 | int hid_connect(struct hid_device *hid, unsigned int connect_mask); |
740 | void hid_disconnect(struct hid_device *hid); | 743 | void hid_disconnect(struct hid_device *hid); |
@@ -805,16 +808,7 @@ static inline void hid_map_usage_clear(struct hid_input *hidinput, | |||
805 | */ | 808 | */ |
806 | static inline int __must_check hid_parse(struct hid_device *hdev) | 809 | static inline int __must_check hid_parse(struct hid_device *hdev) |
807 | { | 810 | { |
808 | int ret; | 811 | return hid_open_report(hdev); |
809 | |||
810 | if (hdev->status & HID_STAT_PARSED) | ||
811 | return 0; | ||
812 | |||
813 | ret = hdev->ll_driver->parse(hdev); | ||
814 | if (!ret) | ||
815 | hdev->status |= HID_STAT_PARSED; | ||
816 | |||
817 | return ret; | ||
818 | } | 812 | } |
819 | 813 | ||
820 | /** | 814 | /** |