Changes in uspace/drv/bus/usb/ohci/hc.c [b7fd2a0:8d2dd7f2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
rb7fd2a0 r8d2dd7f2 91 91 static void hc_gain_control(hc_t *instance); 92 92 static void hc_start(hc_t *instance); 93 static errno_t hc_init_transfer_lists(hc_t *instance);94 static errno_t hc_init_memory(hc_t *instance);93 static int hc_init_transfer_lists(hc_t *instance); 94 static int hc_init_memory(hc_t *instance); 95 95 96 96 /** Generate IRQ code. … … 103 103 * @return Error code. 104 104 */ 105 errno_t ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq)105 int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res) 106 106 { 107 107 assert(code); … … 141 141 RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]); 142 142 143 *irq = hw_res->irqs.irqs[0]; 144 return EOK; 143 return hw_res->irqs.irqs[0]; 145 144 } 146 145 … … 152 151 * @return Error code 153 152 */ 154 errno_t hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts)153 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts) 155 154 { 156 155 assert(instance); … … 160 159 return EINVAL; 161 160 162 errno_t ret = pio_enable_range(&hw_res->mem_ranges.ranges[0],161 int ret = pio_enable_range(&hw_res->mem_ranges.ranges[0], 163 162 (void **) &instance->registers); 164 163 if (ret != EOK) { … … 269 268 } 270 269 271 errno_t ohci_hc_status(hcd_t *hcd, uint32_t *status)270 int ohci_hc_status(hcd_t *hcd, uint32_t *status) 272 271 { 273 272 assert(hcd); … … 289 288 * @return Error code. 290 289 */ 291 errno_t ohci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)290 int ohci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch) 292 291 { 293 292 assert(hcd); … … 518 517 * @return Error code 519 518 */ 520 errno_t hc_init_transfer_lists(hc_t *instance)519 int hc_init_transfer_lists(hc_t *instance) 521 520 { 522 521 assert(instance); … … 524 523 do { \ 525 524 const char *name = usb_str_transfer_type(type); \ 526 const errno_t ret = endpoint_list_init(&instance->lists[type], name); \525 const int ret = endpoint_list_init(&instance->lists[type], name); \ 527 526 if (ret != EOK) { \ 528 527 usb_log_error("Failed to setup %s endpoint list: %s.\n", \ … … 552 551 * @return Error code. 553 552 */ 554 errno_t hc_init_memory(hc_t *instance)553 int hc_init_memory(hc_t *instance) 555 554 { 556 555 assert(instance); … … 558 557 memset(&instance->rh, 0, sizeof(instance->rh)); 559 558 /* Init queues */ 560 const errno_t ret = hc_init_transfer_lists(instance);559 const int ret = hc_init_transfer_lists(instance); 561 560 if (ret != EOK) { 562 561 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.