Changeset 4bb9fd2 in mainline
- Timestamp:
- 2011-04-12T16:35:19Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8f8f34ad
- Parents:
- caed7843
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/usbhid.c
rcaed7843 r4bb9fd2 238 238 int i = 0, count = 0; 239 239 const usb_hid_subdriver_mapping_t *mapping = &usb_hid_subdrivers[i]; 240 241 bool ids_matched; 242 bool matched; 240 243 241 244 while (count < USB_HID_MAX_SUBDRIVERS && … … 254 257 } 255 258 259 ids_matched = false; 260 matched = false; 261 256 262 if (mapping->vendor_id != 0) { 257 263 assert(mapping->product_id != 0); … … 260 266 mapping->product_id); 261 267 if (usb_hid_ids_match(hid_dev, mapping)) { 262 usb_log_debug("Matched.\n"); 263 subdrivers[count++] = &mapping->subdriver; 264 // skip the checking of usage path 265 goto next; 268 usb_log_debug("IDs matched.\n"); 269 ids_matched = true; 266 270 } 267 271 } … … 271 275 if (usb_hid_path_matches(hid_dev, 272 276 mapping->usage_path, mapping->compare)) { 273 subdrivers[count++] = &mapping->subdriver; 274 } else { 275 usb_log_debug("Not matched.\n"); 277 // does not matter if IDs were matched 278 matched = true; 276 279 } 277 } 278 next: 280 } else { 281 // matched only if IDs were matched and there is no path 282 matched = ids_matched; 283 } 284 285 if (matched) { 286 subdrivers[count++] = &mapping->subdriver; 287 } 288 279 289 mapping = &usb_hid_subdrivers[++i]; 280 290 }
Note:
See TracChangeset
for help on using the changeset viewer.