aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-02-10 12:58:48 -0500
committerJiri Kosina <jkosina@suse.cz>2014-02-17 08:52:51 -0500
commit4fa5a7f76cc7b6ac87f57741edd2b124851d119f (patch)
tree02f12545996a893bf29d788375b8001e27a360e0 /include
parent706daeffaf36590efc77142f6a209bfe51804f36 (diff)
HID: core: implement generic .request()
.request() can be emulated through .raw_request() we can implement this emulation in hid-core, and make .request not mandatory for transport layer drivers. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hid.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index a837ede65ec6..09fbbd7fb784 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -753,6 +753,7 @@ struct hid_field *hidinput_get_led_field(struct hid_device *hid);
753unsigned int hidinput_count_leds(struct hid_device *hid); 753unsigned int hidinput_count_leds(struct hid_device *hid);
754__s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code); 754__s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code);
755void hid_output_report(struct hid_report *report, __u8 *data); 755void hid_output_report(struct hid_report *report, __u8 *data);
756void __hid_request(struct hid_device *hid, struct hid_report *rep, int reqtype);
756u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags); 757u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags);
757struct hid_device *hid_allocate_device(void); 758struct hid_device *hid_allocate_device(void);
758struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); 759struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id);
@@ -965,7 +966,9 @@ static inline void hid_hw_request(struct hid_device *hdev,
965 struct hid_report *report, int reqtype) 966 struct hid_report *report, int reqtype)
966{ 967{
967 if (hdev->ll_driver->request) 968 if (hdev->ll_driver->request)
968 hdev->ll_driver->request(hdev, report, reqtype); 969 return hdev->ll_driver->request(hdev, report, reqtype);
970
971 __hid_request(hdev, report, reqtype);
969} 972}
970 973
971/** 974/**