Skip to contentSkip to conversation

HID: move HID_REPORT_TYPES closer to the report-definitions

PATCH In review David Herrmann 2 participants 2 messages Sep 2, 2013 – Sep 4, 2013 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: move HID_REPORT_TYPES closer to the report-definitions

HID_REPORT_TYPES defines the number of available report-types. Move it closer to the actualy definition of the report-types so we can see the relation more clearly (and hopefully will never forget to update it).

---
 include/linux/hid.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/hid.h +2 -2
index 650dc29..383b9d6 100644
@@ -252,6 +252,8 @@ struct hid_item {
 #define HID_OUTPUT_REPORT	1
 #define HID_FEATURE_REPORT	2
 
+#define HID_REPORT_TYPES	3
+
 /*
  * HID connect requests
  */
@@ -401,8 +403,6 @@ struct hid_report_enum {
 	struct hid_report *report_id_hash[256];
 };
 
-#define HID_REPORT_TYPES 3
-
 #define HID_MIN_BUFFER_SIZE	64		/* make sure there is at least a packet size of space */
 #define HID_MAX_BUFFER_SIZE	4096		/* 4kb */
 #define HID_CONTROL_FIFO_SIZE	256		/* to init devices with >100 reports */
Signature · 1 line
1.8.4
#1 lore raw
Quoted 3 lines · David Herrmann

HID_REPORT_TYPES defines the number of available report-types. Move it closer to the actualy definition of the report-types so we can see the relation more clearly (and hopefully will never forget to update it).

Makes sense. Applied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs