Changeset 3f03199 in mainline for uspace/lib/drv/generic
- Timestamp:
- 2013-09-15T06:33:53Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9348862
- Parents:
- dd7078c (diff), 1c0cef0 (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. - Location:
- uspace/lib/drv/generic
- Files:
-
- 1 added
- 3 edited
-
dev_iface.c (modified) (3 diffs)
-
driver.c (modified) (2 diffs)
-
interrupt.c (modified) (2 diffs)
-
remote_pio_window.c (added)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/dev_iface.c
rdd7078c r3f03199 40 40 #include "dev_iface.h" 41 41 #include "remote_hw_res.h" 42 #include "remote_pio_window.h" 42 43 #include "remote_char_dev.h" 43 44 #include "remote_clock_dev.h" … … 58 59 [AUDIO_PCM_BUFFER_IFACE] = &remote_audio_pcm_iface, 59 60 [HW_RES_DEV_IFACE] = &remote_hw_res_iface, 61 [PIO_WINDOW_DEV_IFACE] = &remote_pio_window_iface, 60 62 [CHAR_DEV_IFACE] = &remote_char_dev_iface, 61 63 [GRAPH_DEV_IFACE] = &remote_graph_dev_iface, … … 67 69 [CLOCK_DEV_IFACE] = &remote_clock_dev_iface, 68 70 [BATTERY_DEV_IFACE] = &remote_battery_dev_iface, 69 [AHCI_DEV_IFACE] = &remote_ahci_iface ,71 [AHCI_DEV_IFACE] = &remote_ahci_iface 70 72 } 71 73 }; -
uspace/lib/drv/generic/driver.c
rdd7078c r3f03199 98 98 static ddf_dev_t *driver_get_device(devman_handle_t handle) 99 99 { 100 ddf_dev_t *dev = NULL;101 102 100 assert(fibril_mutex_is_locked(&devices_mutex)); 103 101 104 list_foreach(devices, link) { 105 dev = list_get_instance(link, ddf_dev_t, link); 102 list_foreach(devices, link, ddf_dev_t, dev) { 106 103 if (dev->handle == handle) 107 104 return dev; … … 113 110 static ddf_fun_t *driver_get_function(devman_handle_t handle) 114 111 { 115 ddf_fun_t *fun = NULL;116 117 112 assert(fibril_mutex_is_locked(&functions_mutex)); 118 113 119 list_foreach(functions, link) { 120 fun = list_get_instance(link, ddf_fun_t, link); 114 list_foreach(functions, link, ddf_fun_t, fun) { 121 115 if (fun->handle == handle) 122 116 return fun; -
uspace/lib/drv/generic/interrupt.c
rdd7078c r3f03199 138 138 interrupt_context_list_t *list, int id) 139 139 { 140 interrupt_context_t *ctx; 141 142 fibril_mutex_lock(&list->mutex); 143 144 list_foreach(list->contexts, link) { 145 ctx = list_get_instance(link, interrupt_context_t, link); 140 fibril_mutex_lock(&list->mutex); 141 142 list_foreach(list->contexts, link, interrupt_context_t, ctx) { 146 143 if (ctx->id == id) { 147 144 fibril_mutex_unlock(&list->mutex); … … 157 154 interrupt_context_list_t *list, ddf_dev_t *dev, int irq) 158 155 { 159 interrupt_context_t *ctx; 160 161 fibril_mutex_lock(&list->mutex); 162 163 list_foreach(list->contexts, link) { 164 ctx = list_get_instance(link, interrupt_context_t, link); 156 fibril_mutex_lock(&list->mutex); 157 158 list_foreach(list->contexts, link, interrupt_context_t, ctx) { 165 159 if (ctx->irq == irq && ctx->dev == dev) { 166 160 fibril_mutex_unlock(&list->mutex);
Note:
See TracChangeset
for help on using the changeset viewer.
