Ignore:
File:
1 edited

Legend:

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

    rd51838f rf9b2cb4c  
    3636#include <ddf/interrupt.h>
    3737#include <ddf/log.h>
    38 #include <device/hw_res.h>
    3938#include <device/hw_res_parsed.h>
    4039#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_get(dev);
     1142        ahci->parent_sess = ddf_dev_parent_sess_create(dev);
    11431143        if (ahci->parent_sess == NULL)
    11441144                return NULL;
     
    11851185        ct.ranges = ahci_ranges;
    11861186       
    1187         int irq_cap = register_interrupt_handler(dev,
    1188             hw_res_parsed.irqs.irqs[0], ahci_interrupt, &ct);
    1189         if (irq_cap < 0) {
     1187        int rc = register_interrupt_handler(dev, hw_res_parsed.irqs.irqs[0],
     1188            ahci_interrupt, &ct);
     1189        if (rc != EOK) {
    11901190                ddf_msg(LVL_ERROR, "Failed registering interrupt handler.");
    11911191                goto error_register_interrupt_handler;
    11921192        }
    11931193       
    1194         int rc = hw_res_enable_interrupt(ahci->parent_sess,
    1195             hw_res_parsed.irqs.irqs[0]);
     1194        rc = irc_enable_interrupt(hw_res_parsed.irqs.irqs[0]);
    11961195        if (rc != EOK) {
    11971196                ddf_msg(LVL_ERROR, "Failed enable interupt.");
     
    12031202       
    12041203error_enable_interrupt:
    1205         unregister_interrupt_handler(dev, irq_cap);
     1204        unregister_interrupt_handler(dev, hw_res_parsed.irqs.irqs[0]);
    12061205       
    12071206error_register_interrupt_handler:
Note: See TracChangeset for help on using the changeset viewer.