Ignore:
Timestamp:
2017-10-10T06:51:02Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c46bfbc
Parents:
2bdf92a5
Message:

hw_res_enable_interrupt should allow enabling individual interrupts.

File:
1 edited

Legend:

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

    r2bdf92a5 rcccd60c3  
    692692
    693693//TODO: Cache parent session in HCD
    694 /** Call the parent driver with a request to enable interrupts
     694/** Call the parent driver with a request to enable interrupt
    695695 *
    696696 * @param[in] device Device asking for interrupts
     697 * @param[in] inum Interrupt number
    697698 * @return Error code.
    698699 */
    699 int hcd_ddf_enable_interrupts(ddf_dev_t *device)
     700int hcd_ddf_enable_interrupt(ddf_dev_t *device, int inum)
    700701{
    701702        async_sess_t *parent_sess = ddf_dev_parent_sess_get(device);
     
    703704                return EIO;
    704705
    705         const bool enabled = hw_res_enable_interrupt(parent_sess);
    706 
    707         return enabled ? EOK : EIO;
     706        return hw_res_enable_interrupt(parent_sess, inum);
    708707}
    709708
     
    776775
    777776        /* Enable interrupts */
    778         int ret = hcd_ddf_enable_interrupts(device);
     777        int ret = hcd_ddf_enable_interrupt(device, irq);
    779778        if (ret != EOK) {
    780779                usb_log_error("Failed to register interrupt handler: %s.\n",
Note: See TracChangeset for help on using the changeset viewer.