Changeset feeac0d in mainline for uspace/srv/devman/devman.c
- Timestamp:
- 2013-09-10T16:32:35Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4982d87
- Parents:
- e8d6ce2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
re8d6ce2 rfeeac0d 496 496 driver_t *find_best_match_driver(driver_list_t *drivers_list, dev_node_t *node) 497 497 { 498 driver_t *best_drv = NULL , *drv = NULL;498 driver_t *best_drv = NULL; 499 499 int best_score = 0, score = 0; 500 500 501 501 fibril_mutex_lock(&drivers_list->drivers_mutex); 502 502 503 list_foreach(drivers_list->drivers, link) { 504 drv = list_get_instance(link, driver_t, drivers); 503 list_foreach(drivers_list->drivers, drivers, driver_t, drv) { 505 504 score = get_match_score(drv, node); 506 505 if (score > best_score) { … … 596 595 { 597 596 driver_t *res = NULL; 598 driver_t *drv = NULL;599 597 600 598 fibril_mutex_lock(&drv_list->drivers_mutex); 601 599 602 list_foreach(drv_list->drivers, link) { 603 drv = list_get_instance(link, driver_t, drivers); 600 list_foreach(drv_list->drivers, drivers, driver_t, drv) { 604 601 if (str_cmp(drv->name, drv_name) == 0) { 605 602 res = drv; … … 1131 1128 1132 1129 size_t pos = 0; 1133 list_foreach(dev->functions, item) { 1134 fun_node_t *fun = 1135 list_get_instance(item, fun_node_t, dev_functions); 1136 1130 list_foreach(dev->functions, dev_functions, fun_node_t, fun) { 1137 1131 if (pos < buf_cnt) { 1138 1132 hdl_buf[pos] = fun->handle; … … 1472 1466 assert(fibril_rwlock_is_locked(&tree->rwlock)); 1473 1467 1474 fun_node_t *fun; 1475 1476 list_foreach(dev->functions, link) { 1477 fun = list_get_instance(link, fun_node_t, dev_functions); 1478 1468 list_foreach(dev->functions, dev_functions, fun_node_t, fun) { 1479 1469 if (str_cmp(name, fun->name) == 0) { 1480 1470 fun_add_ref(fun);
Note:
See TracChangeset
for help on using the changeset viewer.