Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    ra996ae31 r80a96d2  
    8080
    8181static irq_code_t default_pseudocode = {
    82         0,
    83         NULL,
    8482        sizeof(default_cmds) / sizeof(irq_cmd_t),
    8583        default_cmds
     
    200198                pseudocode = &default_pseudocode;
    201199       
    202         int res = irq_register(irq, dev->handle, ctx->id, pseudocode);
     200        int res = register_irq(irq, dev->handle, ctx->id, pseudocode);
    203201        if (res != EOK) {
    204202                remove_interrupt_context(&interrupt_contexts, ctx);
     
    213211        interrupt_context_t *ctx = find_interrupt_context(&interrupt_contexts,
    214212            dev, irq);
    215         int res = irq_unregister(irq, dev->handle);
     213        int res = unregister_irq(irq, dev->handle);
    216214       
    217215        if (ctx != NULL) {
     
    273271       
    274272        devman_handle_t dev_handle = IPC_GET_ARG1(*icall);
    275         devman_handle_t parent_fun_handle = IPC_GET_ARG2(*icall);
     273        devman_handle_t parent_fun_handle = IPC_GET_ARG2(*icall);
    276274       
    277275        ddf_dev_t *dev = create_device();
     
    290288        (void) parent_fun_handle;
    291289       
    292         res = driver->driver_ops->dev_add(dev);
     290        res = driver->driver_ops->add_device(dev);
    293291       
    294292        if (res != EOK) {
     
    303301       
    304302        async_answer_0(iid, res);
    305 }
    306 
    307 static void driver_dev_added(ipc_callid_t iid, ipc_call_t *icall)
    308 {
    309         fibril_mutex_lock(&devices_mutex);
    310         ddf_dev_t *dev = driver_get_device(IPC_GET_ARG1(*icall));
    311         fibril_mutex_unlock(&devices_mutex);
    312        
    313         if (dev != NULL && driver->driver_ops->device_added != NULL)
    314                 driver->driver_ops->device_added(dev);
    315303}
    316304
     
    462450                case DRIVER_DEV_ADD:
    463451                        driver_dev_add(callid, &call);
    464                         break;
    465                 case DRIVER_DEV_ADDED:
    466                         async_answer_0(callid, EOK);
    467                         driver_dev_added(callid, &call);
    468452                        break;
    469453                case DRIVER_DEV_REMOVE:
     
    972956       
    973957        match_id->id = str_dup(match_id_str);
    974         match_id->score = match_score;
     958        match_id->score = 90;
    975959       
    976960        add_match_id(&fun->match_ids, match_id);
     
    10181002         * incoming connections.
    10191003         */
    1020         async_set_client_connection(driver_connection);
    1021         rc = devman_driver_register(driver->name);
     1004        rc = devman_driver_register(driver->name, driver_connection);
    10221005        if (rc != EOK) {
    10231006                printf("Error: Failed to register driver with device manager "
Note: See TracChangeset for help on using the changeset viewer.