Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/devman.c

    rb72efe8 r79ae36dd  
    466466        fibril_mutex_lock(&drivers_list->drivers_mutex);
    467467       
    468         list_foreach(drivers_list->drivers, link) {
     468        link_t *link = drivers_list->drivers.next;
     469        while (link != &drivers_list->drivers) {
    469470                drv = list_get_instance(link, driver_t, drivers);
    470471                score = get_match_score(drv, node);
     
    473474                        best_drv = drv;
    474475                }
     476                link = link->next;
    475477        }
    476478       
     
    534536        driver_t *res = NULL;
    535537        driver_t *drv = NULL;
     538        link_t *link;
    536539       
    537540        fibril_mutex_lock(&drv_list->drivers_mutex);
    538541       
    539         list_foreach(drv_list->drivers, link) {
     542        link = drv_list->drivers.next;
     543        while (link != &drv_list->drivers) {
    540544                drv = list_get_instance(link, driver_t, drivers);
    541545                if (str_cmp(drv->name, drv_name) == 0) {
     
    543547                        break;
    544548                }
     549
     550                link = link->next;
    545551        }
    546552       
     
    578584         * that has not been passed to the driver.
    579585         */
    580         link = driver->devices.head.next;
    581         while (link != &driver->devices.head) {
     586        link = driver->devices.next;
     587        while (link != &driver->devices) {
    582588                dev = list_get_instance(link, dev_node_t, driver_devices);
    583589                if (dev->passed_to_driver) {
     
    616622                 * Restart the cycle to go through all devices again.
    617623                 */
    618                 link = driver->devices.head.next;
     624                link = driver->devices.next;
    619625        }
    620626
     
    11811187
    11821188        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) {
    11851194                fun = list_get_instance(link, fun_node_t, dev_functions);
    11861195
     
    13761385{
    13771386        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) {
    13801390                cl = list_get_instance(link, dev_class_t, link);
    13811391                if (str_cmp(cl->name, class_name) == 0) {
    13821392                        return cl;
    13831393                }
     1394                link = link->next;
    13841395        }
    13851396       
     
    13971408        assert(dev_name != NULL);
    13981409
    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) {
    14001414                dev_class_info_t *dev = list_get_instance(link,
    14011415                    dev_class_info_t, link);
Note: See TracChangeset for help on using the changeset viewer.