Changeset d1df381 in mainline for uspace/drv/bus/usb/uhci/uhci.c


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

libusbhost: Make ddf interrupt helper return the used irq.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/uhci.c

    rba4a03a5 rd1df381  
    9797        }
    9898        addr_range_t regs = hw_res.io_ranges.ranges[0];
    99         const int irq = hw_res.irqs.irqs[0];
    10099
    101100        ret = hcd_ddf_setup_hc(device, USB_SPEED_FULL,
     
    116115
    117116        bool interrupts = false;
    118         ret = hcd_ddf_setup_interrupts(device, &hw_res, irq_handler,
     117        const int irq = hcd_ddf_setup_interrupts(device, &hw_res, irq_handler,
    119118            hc_gen_irq_code);
    120         if (ret != EOK) {
     119        if (irq < 0) {
    121120                usb_log_warning("Failed to enable interrupts: %s."
    122                     " Falling back to polling.\n", str_error(ret));
     121                    " Falling back to polling.\n", str_error(irq));
    123122        } else {
    124123                usb_log_debug("Hw interrupts enabled.\n");
Note: See TracChangeset for help on using the changeset viewer.