Changeset 7eaeec1 in mainline for uspace/lib/usbdev/src/recognise.c
- Timestamp:
- 2012-08-20T21:27:38Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6a97f2e
- Parents:
- f3a37e28 (diff), dd13349 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/recognise.c
rf3a37e28 r7eaeec1 33 33 * Functions for recognition of attached devices. 34 34 */ 35 36 /** XXX Fix this */ 37 #define _DDF_DATA_IMPLANT 35 38 36 39 #include <sys/types.h> … … 352 355 353 356 if (dev_ops != NULL) 354 child->ops = dev_ops;357 ddf_fun_set_ops(child, dev_ops); 355 358 else 356 child->ops = &child_ops; 357 358 child->driver_data = dev_data; 359 ddf_fun_set_ops(child, &child_ops); 360 361 ddf_fun_data_implant(child, dev_data); 362 359 363 /* 360 364 * Store the attached device in fun … … 373 377 } 374 378 375 rc = usb_device_create_match_ids(ctrl_pipe, &child->match_ids); 379 match_id_list_t match_ids; 380 init_match_ids(&match_ids); 381 rc = usb_device_create_match_ids(ctrl_pipe, &match_ids); 376 382 if (rc != EOK) 377 383 goto failure; 384 385 list_foreach(match_ids.ids, id_link) { 386 match_id_t *match_id = list_get_instance(id_link, match_id_t, link); 387 rc = ddf_fun_add_match_id(child, match_id->id, match_id->score); 388 if (rc != EOK) { 389 clean_match_ids(&match_ids); 390 goto failure; 391 } 392 } 393 394 clean_match_ids(&match_ids); 378 395 379 396 rc = ddf_fun_bind(child); … … 386 403 failure: 387 404 if (child != NULL) { 388 /* We know nothing about the data if it came from outside. */389 if (dev_data)390 child->driver_data = NULL;391 392 405 /* This takes care of match_id deallocation as well. */ 393 406 ddf_fun_destroy(child);
Note:
See TracChangeset
for help on using the changeset viewer.