Ignore:
Timestamp:
2013-12-31T23:11:00Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d1df381
Parents:
e3a07bba
Message:

usb host: Use all hw resources when generating irq code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/ddf_helpers.c

    re3a07bba rba4a03a5  
    712712 * @return EOK on success or negative error code
    713713 */
    714 int hcd_ddf_setup_interrupts(ddf_dev_t *device, addr_range_t *regs, int irq,
     714int hcd_ddf_setup_interrupts(ddf_dev_t *device,
     715    const hw_res_list_parsed_t *hw_res,
    715716    interrupt_handler_t handler,
    716     int (*gen_irq_code)(irq_code_t *, addr_range_t *))
     717    int (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *hw_res))
    717718{
    718719
    719720        assert(device);
    720         assert(regs);
     721        assert(hw_res);
    721722        assert(handler);
    722723        assert(gen_irq_code);
    723724
    724 
    725725        irq_code_t irq_code = {0};
    726726
    727         int ret = gen_irq_code(&irq_code, regs);
    728         if (ret != EOK) {
     727        int irq = gen_irq_code(&irq_code, hw_res);
     728        if (irq < 0) {
    729729                usb_log_error("Failed to generate IRQ code: %s.\n",
    730                     str_error(ret));
    731                 return ret;
     730                    str_error(irq));
     731                return irq;
    732732        }
    733733
    734734        /* Register handler to avoid interrupt lockup */
    735         ret = register_interrupt_handler(device, irq, handler, &irq_code);
     735        int ret = register_interrupt_handler(device, irq, handler, &irq_code);
    736736        irq_code_clean(&irq_code);
    737737        if (ret != EOK) {
Note: See TracChangeset for help on using the changeset viewer.