Changeset 99c2c69e in mainline for uspace/lib/drv/generic/driver.c


Ignore:
Timestamp:
2013-09-13T00:36:30Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
67fbd5e
Parents:
7f84430 (diff), 11d41be5 (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:

mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    r7f84430 r99c2c69e  
    9898static ddf_dev_t *driver_get_device(devman_handle_t handle)
    9999{
    100         ddf_dev_t *dev = NULL;
    101        
    102100        assert(fibril_mutex_is_locked(&devices_mutex));
    103101       
    104         list_foreach(devices, link) {
    105                 dev = list_get_instance(link, ddf_dev_t, link);
     102        list_foreach(devices, link, ddf_dev_t, dev) {
    106103                if (dev->handle == handle)
    107104                        return dev;
     
    113110static ddf_fun_t *driver_get_function(devman_handle_t handle)
    114111{
    115         ddf_fun_t *fun = NULL;
    116        
    117112        assert(fibril_mutex_is_locked(&functions_mutex));
    118113       
    119         list_foreach(functions, link) {
    120                 fun = list_get_instance(link, ddf_fun_t, link);
     114        list_foreach(functions, link, ddf_fun_t, fun) {
    121115                if (fun->handle == handle)
    122116                        return fun;
Note: See TracChangeset for help on using the changeset viewer.