Changes in uspace/srv/devman/devman.c [b72efe8:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
rb72efe8 r79ae36dd 466 466 fibril_mutex_lock(&drivers_list->drivers_mutex); 467 467 468 list_foreach(drivers_list->drivers, link) { 468 link_t *link = drivers_list->drivers.next; 469 while (link != &drivers_list->drivers) { 469 470 drv = list_get_instance(link, driver_t, drivers); 470 471 score = get_match_score(drv, node); … … 473 474 best_drv = drv; 474 475 } 476 link = link->next; 475 477 } 476 478 … … 534 536 driver_t *res = NULL; 535 537 driver_t *drv = NULL; 538 link_t *link; 536 539 537 540 fibril_mutex_lock(&drv_list->drivers_mutex); 538 541 539 list_foreach(drv_list->drivers, link) { 542 link = drv_list->drivers.next; 543 while (link != &drv_list->drivers) { 540 544 drv = list_get_instance(link, driver_t, drivers); 541 545 if (str_cmp(drv->name, drv_name) == 0) { … … 543 547 break; 544 548 } 549 550 link = link->next; 545 551 } 546 552 … … 578 584 * that has not been passed to the driver. 579 585 */ 580 link = driver->devices. head.next;581 while (link != &driver->devices .head) {586 link = driver->devices.next; 587 while (link != &driver->devices) { 582 588 dev = list_get_instance(link, dev_node_t, driver_devices); 583 589 if (dev->passed_to_driver) { … … 616 622 * Restart the cycle to go through all devices again. 617 623 */ 618 link = driver->devices. head.next;624 link = driver->devices.next; 619 625 } 620 626 … … 1181 1187 1182 1188 fun_node_t *fun; 1183 1184 list_foreach(dev->functions, link) { 1189 link_t *link; 1190 1191 for (link = dev->functions.next; 1192 link != &dev->functions; 1193 link = link->next) { 1185 1194 fun = list_get_instance(link, fun_node_t, dev_functions); 1186 1195 … … 1376 1385 { 1377 1386 dev_class_t *cl; 1378 1379 list_foreach(class_list->classes, link) { 1387 link_t *link = class_list->classes.next; 1388 1389 while (link != &class_list->classes) { 1380 1390 cl = list_get_instance(link, dev_class_t, link); 1381 1391 if (str_cmp(cl->name, class_name) == 0) { 1382 1392 return cl; 1383 1393 } 1394 link = link->next; 1384 1395 } 1385 1396 … … 1397 1408 assert(dev_name != NULL); 1398 1409 1399 list_foreach(dev_class->devices, link) { 1410 link_t *link; 1411 for (link = dev_class->devices.next; 1412 link != &dev_class->devices; 1413 link = link->next) { 1400 1414 dev_class_info_t *dev = list_get_instance(link, 1401 1415 dev_class_info_t, link);
Note:
See TracChangeset
for help on using the changeset viewer.