Changes in uspace/lib/usbdev/src/recognise.c [56fd7cf:77ad86c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/recognise.c
r56fd7cf r77ad86c 33 33 * Functions for recognition of attached devices. 34 34 */ 35 36 /** XXX Fix this */37 #define _DDF_DATA_IMPLANT38 35 39 36 #include <sys/types.h> … … 355 352 356 353 if (dev_ops != NULL) 357 ddf_fun_set_ops(child, dev_ops);354 child->ops = dev_ops; 358 355 else 359 ddf_fun_set_ops(child, &child_ops); 360 361 ddf_fun_data_implant(child, dev_data); 362 356 child->ops = &child_ops; 357 358 child->driver_data = dev_data; 363 359 /* 364 360 * Store the attached device in fun … … 377 373 } 378 374 379 match_id_list_t match_ids; 380 init_match_ids(&match_ids); 381 rc = usb_device_create_match_ids(ctrl_pipe, &match_ids); 375 rc = usb_device_create_match_ids(ctrl_pipe, &child->match_ids); 382 376 if (rc != EOK) 383 377 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);395 378 396 379 rc = ddf_fun_bind(child); … … 403 386 failure: 404 387 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 405 392 /* This takes care of match_id deallocation as well. */ 406 393 ddf_fun_destroy(child);
Note:
See TracChangeset
for help on using the changeset viewer.