Re: [PATCH 05/18] HID: introduce hid_get_feature

From
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date
2022-01-07 22:01:05
Reply to
Angela Czubak, 2021-12-21
On Tue, Dec 21, 2021 at 07:17:30PM +0000, Angela Czubak wrote:
quoted hunk ↗ jump to hunk
Move mt_get_feature from hid-multitouch to hid-core as it is a generic
function that can be used by other drivers as well.

Signed-off-by: Angela Czubak <redacted>
---
 drivers/hid/hid-core.c       | 39 ++++++++++++++++++++++++++++++++++++
 drivers/hid/hid-multitouch.c | 38 +++--------------------------------
 include/linux/hid.h          |  1 +
 3 files changed, 43 insertions(+), 35 deletions(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index dbed2524fd47..c11cb7324157 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1796,6 +1796,45 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
 }
 EXPORT_SYMBOL_GPL(hid_report_raw_event);
 
+/**
+ * hid_get_feature - retrieve feature report from device
+ *
+ * @hdev: hid device
+ * @report: hid report to retrieve
+ */
+void hid_get_feature(struct hid_device *hdev, struct hid_report *report)
If this is a generic API I believe it should return success/error code
so that users can decide what to do.

Thanks.

-- 
Dmitry
Thread (48 messages) 48 messages, 7 authors, last reply 2022-01-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help