Changeset d0a6e54 in mainline
- Timestamp:
- 2011-04-21T17:16:53Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3bcac68
- Parents:
- 020559c9
- Location:
- uspace/drv/usbhid
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/subdrivers.c
r020559c9 rd0a6e54 55 55 USB_HID_PATH_COMPARE_END 56 56 | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 57 0,58 0,57 -1, 58 -1, 59 59 { 60 60 .init = usb_kbd_init, … … 79 79 } 80 80 }, 81 {NULL, -1, 0, 0, 0, {NULL, NULL, NULL, NULL}}81 {NULL, -1, 0, -1, -1, {NULL, NULL, NULL, NULL}} 82 82 }; 83 83 -
uspace/drv/usbhid/subdrivers.h
r020559c9 rd0a6e54 56 56 int report_id; 57 57 int compare; 58 uint16_t vendor_id;59 uint16_t product_id;58 int vendor_id; 59 int product_id; 60 60 usb_hid_subdriver_t subdriver; 61 61 } usb_hid_subdriver_mapping_t; -
uspace/drv/usbhid/usbhid.c
r020559c9 rd0a6e54 251 251 while (count < USB_HID_MAX_SUBDRIVERS && 252 252 (mapping->usage_path != NULL 253 || mapping->vendor_id != 0 || mapping->product_id != 0)) {253 || mapping->vendor_id >= 0 || mapping->product_id >= 0)) { 254 254 // check the vendor & product ID 255 if (mapping->vendor_id != 0 && mapping->product_id ==0) {256 usb_log_warning("Missing Product ID for Vendor ID % u\n",255 if (mapping->vendor_id >= 0 && mapping->product_id < 0) { 256 usb_log_warning("Missing Product ID for Vendor ID %d\n", 257 257 mapping->vendor_id); 258 258 return EINVAL; 259 259 } 260 if (mapping->product_id != 0 && mapping->vendor_id ==0) {261 usb_log_warning("Missing Vendor ID for Product ID % u\n",260 if (mapping->product_id >= 0 && mapping->vendor_id < 0) { 261 usb_log_warning("Missing Vendor ID for Product ID %d\n", 262 262 mapping->product_id); 263 263 return EINVAL; … … 267 267 matched = false; 268 268 269 if (mapping->vendor_id != 0) {270 assert(mapping->product_id != 0);269 if (mapping->vendor_id >= 0) { 270 assert(mapping->product_id >= 0); 271 271 usb_log_debug("Comparing device against vendor ID %u" 272 272 " and product ID %u.\n", mapping->vendor_id,
Note:
See TracChangeset
for help on using the changeset viewer.