Skip to contentSkip to conversation

input: Update uhid_copy.h to version from Linux 3.14

PATCH In review Szymon Janc 3 participants 4 messages May 24, 2014 – May 25, 2014 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 input: Update uhid_copy.h to version from Linux 3.14

---
 profiles/input/uhid_copy.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
profiles/input/uhid_copy.h +4 -2
index 381b062..23a6287 100644
@@ -30,7 +30,7 @@ enum uhid_event_type {
 	UHID_OPEN,
 	UHID_CLOSE,
 	UHID_OUTPUT,
-	UHID_OUTPUT_EV,
+	UHID_OUTPUT_EV,			/* obsolete! */
 	UHID_INPUT,
 	UHID_FEATURE,
 	UHID_FEATURE_ANSWER,
@@ -69,6 +69,8 @@ struct uhid_output_req {
 	__u8 rtype;
 } __attribute__((__packed__));
 
+/* Obsolete! Newer kernels will no longer send these events but instead convert
+ * it into raw output reports via UHID_OUTPUT. */
 struct uhid_output_ev_req {
 	__u16 type;
 	__u16 code;
@@ -86,7 +88,7 @@ struct uhid_feature_answer_req {
 	__u16 err;
 	__u16 size;
 	__u8 data[UHID_DATA_MAX];
-};
+} __attribute__((__packed__));
 
 struct uhid_event {
 	__u32 type;
Signature · 1 line
2.0.0.rc4
#1 lore raw

PATCH 2/2 shared/uhid: Use uhid_copy.h instead of system header

---
 src/shared/uhid.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/shared/uhid.h +2 -1
index fcf5379..459a249 100644
@@ -23,7 +23,8 @@
 
 #include <stdbool.h>
 #include <stdint.h>
-#include <linux/uhid.h>
+
+#include "profiles/input/uhid_copy.h"
 
 struct bt_uhid;
 
Signature · 1 line
2.0.0.rc4
#2 lore raw

Re: [PATCH 2/2] shared/uhid: Use uhid_copy.h instead of system header

Hi Szymon,

Quoted 19 lines · Szymon Janc
---
 src/shared/uhid.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/shared/uhid.h +2 -2
index fcf5379..459a249 100644
@@ -23,7 +23,8 @@
 
 #include <stdbool.h>
 #include <stdint.h>
-#include <linux/uhid.h>
+
+#include "profiles/input/uhid_copy.h"
 
 struct bt_uhid;
 
--
Quoted 1 line

2.0.0.rc4

Maybe we should move uhid_copy to shared or just merge it in uhid.h, anyway no code should be using uhid_copy alone now that we bt_uhid in place.

Signature · 1 line
Luiz Augusto von Dentz
#3 lore raw
In reply to Szymon Janc

Hi Szymon,

Quoted 3 lines · Szymon Janc
---
 profiles/input/uhid_copy.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Both patches have been applied. Thanks.

Johan