Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/hc.c

    r8d2dd7f2 rb7fd2a0  
    9191static void hc_gain_control(hc_t *instance);
    9292static void hc_start(hc_t *instance);
    93 static int hc_init_transfer_lists(hc_t *instance);
    94 static int hc_init_memory(hc_t *instance);
     93static errno_t hc_init_transfer_lists(hc_t *instance);
     94static errno_t hc_init_memory(hc_t *instance);
    9595
    9696/** Generate IRQ code.
     
    103103 * @return Error code.
    104104 */
    105 int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res)
     105errno_t ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq)
    106106{
    107107        assert(code);
     
    141141            RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]);
    142142
    143         return hw_res->irqs.irqs[0];
     143        *irq = hw_res->irqs.irqs[0];
     144        return EOK;
    144145}
    145146
     
    151152 * @return Error code
    152153 */
    153 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts)
     154errno_t hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts)
    154155{
    155156        assert(instance);
     
    159160            return EINVAL;
    160161
    161         int ret = pio_enable_range(&hw_res->mem_ranges.ranges[0],
     162        errno_t ret = pio_enable_range(&hw_res->mem_ranges.ranges[0],
    162163            (void **) &instance->registers);
    163164        if (ret != EOK) {
     
    268269}
    269270
    270 int ohci_hc_status(hcd_t *hcd, uint32_t *status)
     271errno_t ohci_hc_status(hcd_t *hcd, uint32_t *status)
    271272{
    272273        assert(hcd);
     
    288289 * @return Error code.
    289290 */
    290 int ohci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)
     291errno_t ohci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)
    291292{
    292293        assert(hcd);
     
    517518 * @return Error code
    518519 */
    519 int hc_init_transfer_lists(hc_t *instance)
     520errno_t hc_init_transfer_lists(hc_t *instance)
    520521{
    521522        assert(instance);
     
    523524do { \
    524525        const char *name = usb_str_transfer_type(type); \
    525         const int ret = endpoint_list_init(&instance->lists[type], name); \
     526        const errno_t ret = endpoint_list_init(&instance->lists[type], name); \
    526527        if (ret != EOK) { \
    527528                usb_log_error("Failed to setup %s endpoint list: %s.\n", \
     
    551552 * @return Error code.
    552553 */
    553 int hc_init_memory(hc_t *instance)
     554errno_t hc_init_memory(hc_t *instance)
    554555{
    555556        assert(instance);
     
    557558        memset(&instance->rh, 0, sizeof(instance->rh));
    558559        /* Init queues */
    559         const int ret = hc_init_transfer_lists(instance);
     560        const errno_t ret = hc_init_transfer_lists(instance);
    560561        if (ret != EOK) {
    561562                return ret;
Note: See TracChangeset for help on using the changeset viewer.