Changeset e4f8c77 in mainline for uspace/srv/devman/devman.c


Ignore:
Timestamp:
2011-07-13T22:39:18Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e6910c8
Parents:
5974661 (diff), 8ecef91 (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.
Message:

Merge libposix.

File:
1 edited

Legend:

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

    r5974661 re4f8c77  
    466466        fibril_mutex_lock(&drivers_list->drivers_mutex);
    467467       
    468         link_t *link = drivers_list->drivers.next;
    469         while (link != &drivers_list->drivers) {
     468        list_foreach(drivers_list->drivers, link) {
    470469                drv = list_get_instance(link, driver_t, drivers);
    471470                score = get_match_score(drv, node);
     
    474473                        best_drv = drv;
    475474                }
    476                 link = link->next;
    477475        }
    478476       
     
    536534        driver_t *res = NULL;
    537535        driver_t *drv = NULL;
    538         link_t *link;
    539536       
    540537        fibril_mutex_lock(&drv_list->drivers_mutex);
    541538       
    542         link = drv_list->drivers.next;
    543         while (link != &drv_list->drivers) {
     539        list_foreach(drv_list->drivers, link) {
    544540                drv = list_get_instance(link, driver_t, drivers);
    545541                if (str_cmp(drv->name, drv_name) == 0) {
     
    547543                        break;
    548544                }
    549 
    550                 link = link->next;
    551545        }
    552546       
     
    584578         * that has not been passed to the driver.
    585579         */
    586         link = driver->devices.next;
    587         while (link != &driver->devices) {
     580        link = driver->devices.head.next;
     581        while (link != &driver->devices.head) {
    588582                dev = list_get_instance(link, dev_node_t, driver_devices);
    589583                if (dev->passed_to_driver) {
     
    622616                 * Restart the cycle to go through all devices again.
    623617                 */
    624                 link = driver->devices.next;
     618                link = driver->devices.head.next;
    625619        }
    626620
     
    11871181
    11881182        fun_node_t *fun;
    1189         link_t *link;
    1190 
    1191         for (link = dev->functions.next;
    1192             link != &dev->functions;
    1193             link = link->next) {
     1183
     1184        list_foreach(dev->functions, link) {
    11941185                fun = list_get_instance(link, fun_node_t, dev_functions);
    11951186
     
    13851376{
    13861377        dev_class_t *cl;
    1387         link_t *link = class_list->classes.next;
    1388        
    1389         while (link != &class_list->classes) {
     1378       
     1379        list_foreach(class_list->classes, link) {
    13901380                cl = list_get_instance(link, dev_class_t, link);
    13911381                if (str_cmp(cl->name, class_name) == 0) {
    13921382                        return cl;
    13931383                }
    1394                 link = link->next;
    13951384        }
    13961385       
     
    14081397        assert(dev_name != NULL);
    14091398
    1410         link_t *link;
    1411         for (link = dev_class->devices.next;
    1412             link != &dev_class->devices;
    1413             link = link->next) {
     1399        list_foreach(dev_class->devices, link) {
    14141400                dev_class_info_t *dev = list_get_instance(link,
    14151401                    dev_class_info_t, link);
Note: See TracChangeset for help on using the changeset viewer.