Changeset 071a1ddb in mainline for uspace/drv/nic/rtl8139


Ignore:
Timestamp:
2017-12-08T21:17:27Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0722869, 569a51a
Parents:
9233e9d
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 00:30:18)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:17:27)
Message:

Return IRQ handles via a separate out parameter in all uspace code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/rtl8139/driver.c

    r9233e9d r071a1ddb  
    842842 *  @param nic_data  The driver data
    843843 *
    844  *  @return IRQ capability handle if the handler was registered.
     844 *  @param[out] handle  IRQ capability handle if the handler was registered.
     845 *
    845846 *  @return Negative error code otherwise.
    846847 */
    847 inline static int rtl8139_register_int_handler(nic_t *nic_data)
     848inline static int rtl8139_register_int_handler(nic_t *nic_data, cap_handle_t *handle)
    848849{
    849850        rtl8139_t *rtl8139 = nic_get_specific(nic_data);
     
    856857        rtl8139_irq_code.cmds[2].addr = rtl8139->io_addr + ISR;
    857858        rtl8139_irq_code.cmds[3].addr = rtl8139->io_addr + IMR;
    858         int cap = register_interrupt_handler(nic_get_ddf_dev(nic_data),
    859             rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code);
     859        int rc = register_interrupt_handler(nic_get_ddf_dev(nic_data),
     860            rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code, handle);
    860861
    861862        RTL8139_IRQ_STRUCT_UNLOCK();
    862863
    863         return cap;
     864        return rc;
    864865}
    865866
     
    12871288
    12881289        /* Register interrupt handler */
    1289         int irq_cap = rtl8139_register_int_handler(nic_data);
    1290         if (irq_cap < 0) {
    1291                 rc = irq_cap;
     1290        int irq_cap;
     1291        rc = rtl8139_register_int_handler(nic_data, &irq_cap);
     1292        if (rc != EOK) {
    12921293                goto err_pio;
    12931294        }
Note: See TracChangeset for help on using the changeset viewer.