mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
HID: core: Add reserved item tag for main items
For main items, separate warning of reserved item tag from warning of unknown item tag. This comes from 6.2.2.4 Main Items of Device Class Definition for HID 1.11 specification. Signed-off-by: Tatsuya S <tatsuya.s2862@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
parent
27c0278477
commit
c600a55922
2 changed files with 7 additions and 1 deletions
|
|
@ -657,7 +657,11 @@ static int hid_parser_main(struct hid_parser *parser, struct hid_item *item)
|
|||
ret = hid_add_field(parser, HID_FEATURE_REPORT, data);
|
||||
break;
|
||||
default:
|
||||
hid_warn(parser->device, "unknown main item tag 0x%x\n", item->tag);
|
||||
if (item->tag >= HID_MAIN_ITEM_TAG_RESERVED_MIN &&
|
||||
item->tag <= HID_MAIN_ITEM_TAG_RESERVED_MAX)
|
||||
hid_warn(parser->device, "reserved main item tag 0x%x\n", item->tag);
|
||||
else
|
||||
hid_warn(parser->device, "unknown main item tag 0x%x\n", item->tag);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,8 @@ struct hid_item {
|
|||
#define HID_MAIN_ITEM_TAG_FEATURE 11
|
||||
#define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION 10
|
||||
#define HID_MAIN_ITEM_TAG_END_COLLECTION 12
|
||||
#define HID_MAIN_ITEM_TAG_RESERVED_MIN 13
|
||||
#define HID_MAIN_ITEM_TAG_RESERVED_MAX 15
|
||||
|
||||
/*
|
||||
* HID report descriptor main item contents
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue