Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/ne2k/ne2k.c

    r60744cb re55d2c1  
    4343#include <str_error.h>
    4444#include <async.h>
     45#include <ddf/log.h>
    4546#include "dp8390.h"
    4647
     
    121122};
    122123
    123 static void ne2k_interrupt_handler(ipc_call_t *, void *);
     124static void ne2k_interrupt_handler(ipc_call_t *, ddf_dev_t *);
    124125
    125126static errno_t ne2k_register_interrupt(nic_t *nic_data,
     
    161162
    162163        return register_interrupt_handler(nic_get_ddf_dev(nic_data),
    163             ne2k->irq, ne2k_interrupt_handler, (void *)nic_data, &ne2k->code,
    164             handle);
     164            ne2k->irq, ne2k_interrupt_handler, &ne2k->code, handle);
    165165}
    166166
     
    238238}
    239239
    240 /** NE2K interrupt handler
    241  *
    242  * @param call IRQ event notification
    243  * @param arg Argument (nic_t *)
    244  */
    245 void ne2k_interrupt_handler(ipc_call_t *call, void *arg)
    246 {
    247         nic_t *nic_data = (nic_t *)arg;
     240void ne2k_interrupt_handler(ipc_call_t *call, ddf_dev_t *dev)
     241{
     242        nic_t *nic_data = DRIVER_DATA(dev);
    248243        ne2k_interrupt(nic_data, IRQ_GET_ISR(*call), IRQ_GET_TSR(*call));
    249244}
     
    449444        }
    450445
    451         rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);
     446        rc = nic_fun_add_to_cats(fun);
    452447        if (rc != EOK) {
     448                ddf_msg(LVL_ERROR, "Failed adding function to categories");
    453449                ddf_fun_unbind(fun);
    454                 ddf_fun_destroy(fun);
    455450                return rc;
    456451        }
     
    482477        nic_driver_implement(&ne2k_driver_ops, &ne2k_dev_ops, &ne2k_nic_iface);
    483478
     479        ddf_log_init(NAME);
    484480        return ddf_driver_main(&ne2k_driver);
    485481}
Note: See TracChangeset for help on using the changeset viewer.