summaryrefslogtreecommitdiff
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-02-05 16:33:23 -0500
committerJiri Kosina <jkosina@suse.cz>2014-02-17 14:05:59 +0100
commit7e845d46b13e7730a3720e978c28117ce422edf9 (patch)
tree6696e6c38af680b7a2536f4731d106b3619c20bc /include/linux/hid.h
parentcafebc058bf86e63fff5354864781d3de11e41d3 (diff)
HID: introduce helper to access hid_output_raw_report()
Add a helper to access hdev->hid_output_raw_report(). To convert the drivers, use the following snippets: for i in drivers/hid/*.c do sed -i.bak "s/[^ \t]*->hid_output_raw_report(/hid_output_raw_report(/g" $i done Then manually fix for checkpatch.pl Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r--include/linux/hid.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index c56681a66b0b..a837ede65ec6 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -1012,6 +1012,22 @@ static inline int hid_hw_output_report(struct hid_device *hdev, __u8 *buf,
}
/**
+ * hid_output_raw_report - send an output or a feature report to the device
+ *
+ * @hdev: hid device
+ * @buf: raw data to transfer
+ * @len: length of buf
+ * @report_type: HID_FEATURE_REPORT or HID_OUTPUT_REPORT
+ *
+ * @return: count of data transfered, negative if error
+ */
+static inline int hid_output_raw_report(struct hid_device *hdev, __u8 *buf,
+ size_t len, unsigned char report_type)
+{
+ return hdev->hid_output_raw_report(hdev, buf, len, report_type);
+}
+
+/**
* hid_hw_idle - send idle request to device
*
* @hdev: hid device