Changeset ff97957 in mainline
- Timestamp:
- 2013-09-12T10:28:41Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9e470c0
- Parents:
- 7d771d5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/isa/isa.c
r7d771d5 rff97957 65 65 #include <ddf/log.h> 66 66 #include <ops/hw_res.h> 67 #include <ops/pio_window.h> 67 68 68 69 #include <device/hw_res.h> … … 104 105 } 105 106 106 static hw_resource_list_t *isa_ get_fun_resources(ddf_fun_t *fnode)107 { 108 isa_fun_t * isa= isa_fun(fnode);109 assert( isa);110 111 return & isa->hw_resources;107 static hw_resource_list_t *isa_fun_get_resources(ddf_fun_t *fnode) 108 { 109 isa_fun_t *fun = isa_fun(fnode); 110 assert(fun); 111 112 return &fun->hw_resources; 112 113 } 113 114 … … 116 117 /* This is an old ugly way, copied from pci driver */ 117 118 assert(fnode); 118 isa_fun_t * isa= isa_fun(fnode);119 assert( isa);119 isa_fun_t *fun = isa_fun(fnode); 120 assert(fun); 120 121 121 122 sysarg_t apic; … … 133 134 return false; 134 135 135 const hw_resource_list_t *res = & isa->hw_resources;136 const hw_resource_list_t *res = &fun->hw_resources; 136 137 assert(res); 137 138 for (size_t i = 0; i < res->count; ++i) { … … 159 160 { 160 161 assert(fnode); 161 isa_fun_t * isa= isa_fun(fnode);162 assert( isa);163 const hw_resource_list_t *res = & isa->hw_resources;162 isa_fun_t *fun = isa_fun(fnode); 163 assert(fun); 164 const hw_resource_list_t *res = &fun->hw_resources; 164 165 assert(res); 165 166 … … 182 183 assert(size); 183 184 assert(fnode); 184 isa_fun_t * isa= isa_fun(fnode);185 assert( isa);186 const hw_resource_list_t *res = & isa->hw_resources;185 isa_fun_t *fun = isa_fun(fnode); 186 assert(fun); 187 const hw_resource_list_t *res = &fun->hw_resources; 187 188 assert(res); 188 189 … … 201 202 202 203 static hw_res_ops_t isa_fun_hw_res_ops = { 203 .get_resource_list = isa_ get_fun_resources,204 .get_resource_list = isa_fun_get_resources, 204 205 .enable_interrupt = isa_fun_enable_interrupt, 205 206 .dma_channel_setup = isa_fun_setup_dma, … … 207 208 }; 208 209 210 static pio_window_t *isa_fun_get_pio_window(ddf_fun_t *fnode) 211 { 212 ddf_dev_t *dev = ddf_fun_get_dev(fnode); 213 isa_bus_t *isa = isa_bus(dev); 214 assert(isa); 215 216 return &isa->pio_win; 217 } 218 219 static pio_window_ops_t isa_fun_pio_window_ops = { 220 .get_pio_window = isa_fun_get_pio_window 221 }; 222 209 223 static ddf_dev_ops_t isa_fun_ops= { 210 224 .interfaces[HW_RES_DEV_IFACE] = &isa_fun_hw_res_ops, 225 .interfaces[PIO_WINDOW_DEV_IFACE] = &isa_fun_pio_window_ops, 211 226 }; 212 227
Note:
See TracChangeset
for help on using the changeset viewer.