Changes in uspace/drv/bus/usb/ehci/hc.c [b7fd2a0:8d2dd7f2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/hc.c
rb7fd2a0 r8d2dd7f2 90 90 91 91 static void hc_start(hc_t *instance); 92 static errno_t hc_init_memory(hc_t *instance);92 static int hc_init_memory(hc_t *instance); 93 93 94 94 /** Generate IRQ code. … … 96 96 * @param[in] hw_res Device's resources. 97 97 * 98 * @param[out] irq99 *100 98 * @return Error code. 101 99 */ 102 errno_t ehci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq)100 int ehci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res) 103 101 { 104 102 assert(code); … … 132 130 ehci_caps_regs_t *caps = NULL; 133 131 134 errno_t ret = pio_enable_range(®s, (void**)&caps);132 int ret = pio_enable_range(®s, (void**)&caps); 135 133 if (ret != EOK) { 136 134 free(code->ranges); … … 148 146 RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]); 149 147 150 *irq = hw_res->irqs.irqs[0]; 151 return EOK; 148 return hw_res->irqs.irqs[0]; 152 149 } 153 150 … … 159 156 * @return Error code 160 157 */ 161 errno_t hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts)158 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts) 162 159 { 163 160 assert(instance); … … 168 165 return EINVAL; 169 166 170 errno_t ret = pio_enable_range(&hw_res->mem_ranges.ranges[0],167 int ret = pio_enable_range(&hw_res->mem_ranges.ranges[0], 171 168 (void **)&instance->caps); 172 169 if (ret != EOK) { … … 273 270 } 274 271 275 errno_t ehci_hc_status(hcd_t *hcd, uint32_t *status)272 int ehci_hc_status(hcd_t *hcd, uint32_t *status) 276 273 { 277 274 assert(hcd); … … 294 291 * @return Error code. 295 292 */ 296 errno_t ehci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)293 int ehci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch) 297 294 { 298 295 assert(hcd); … … 445 442 * @return Error code. 446 443 */ 447 errno_t hc_init_memory(hc_t *instance)444 int hc_init_memory(hc_t *instance) 448 445 { 449 446 assert(instance); 450 447 usb_log_debug2("HC(%p): Initializing Async list(%p).", instance, 451 448 &instance->async_list); 452 errno_t ret = endpoint_list_init(&instance->async_list, "ASYNC");449 int ret = endpoint_list_init(&instance->async_list, "ASYNC"); 453 450 if (ret != EOK) { 454 451 usb_log_error("HC(%p): Failed to setup ASYNC list: %s",
Note:
See TracChangeset
for help on using the changeset viewer.