Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/ahci/ahci.c

    rf9b2cb4c rd51838f  
    3636#include <ddf/interrupt.h>
    3737#include <ddf/log.h>
     38#include <device/hw_res.h>
    3839#include <device/hw_res_parsed.h>
    3940#include <pci_dev_iface.h>
    40 #include <irc.h>
    4141#include <ahci_iface.h>
    4242#include "ahci.h"
     
    11401140       
    11411141        /* Connect to parent device */
    1142         ahci->parent_sess = ddf_dev_parent_sess_create(dev);
     1142        ahci->parent_sess = ddf_dev_parent_sess_get(dev);
    11431143        if (ahci->parent_sess == NULL)
    11441144                return NULL;
     
    11851185        ct.ranges = ahci_ranges;
    11861186       
    1187         int rc = register_interrupt_handler(dev, hw_res_parsed.irqs.irqs[0],
    1188             ahci_interrupt, &ct);
    1189         if (rc != EOK) {
     1187        int irq_cap = register_interrupt_handler(dev,
     1188            hw_res_parsed.irqs.irqs[0], ahci_interrupt, &ct);
     1189        if (irq_cap < 0) {
    11901190                ddf_msg(LVL_ERROR, "Failed registering interrupt handler.");
    11911191                goto error_register_interrupt_handler;
    11921192        }
    11931193       
    1194         rc = irc_enable_interrupt(hw_res_parsed.irqs.irqs[0]);
     1194        int rc = hw_res_enable_interrupt(ahci->parent_sess,
     1195            hw_res_parsed.irqs.irqs[0]);
    11951196        if (rc != EOK) {
    11961197                ddf_msg(LVL_ERROR, "Failed enable interupt.");
     
    12021203       
    12031204error_enable_interrupt:
    1204         unregister_interrupt_handler(dev, hw_res_parsed.irqs.irqs[0]);
     1205        unregister_interrupt_handler(dev, irq_cap);
    12051206       
    12061207error_register_interrupt_handler:
Note: See TracChangeset for help on using the changeset viewer.