Changes in uspace/lib/drv/generic/driver.c [feeac0d:9e79a2f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
rfeeac0d r9e79a2f 98 98 static ddf_dev_t *driver_get_device(devman_handle_t handle) 99 99 { 100 ddf_dev_t *dev = NULL; 101 100 102 assert(fibril_mutex_is_locked(&devices_mutex)); 101 103 102 list_foreach(devices, link, ddf_dev_t, dev) { 104 list_foreach(devices, link) { 105 dev = list_get_instance(link, ddf_dev_t, link); 103 106 if (dev->handle == handle) 104 107 return dev; … … 110 113 static ddf_fun_t *driver_get_function(devman_handle_t handle) 111 114 { 115 ddf_fun_t *fun = NULL; 116 112 117 assert(fibril_mutex_is_locked(&functions_mutex)); 113 118 114 list_foreach(functions, link, ddf_fun_t, fun) { 119 list_foreach(functions, link) { 120 fun = list_get_instance(link, ddf_fun_t, link); 115 121 if (fun->handle == handle) 116 122 return fun; … … 815 821 assert(fun->bound == false); 816 822 assert(fun->name != NULL); 823 assert(fun->dev != NULL); 817 824 818 825 add_to_functions_list(fun);
Note:
See TracChangeset
for help on using the changeset viewer.