Ignore:
File:
1 edited

Legend:

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

    r80a96d2 r0c0f823b  
    271271       
    272272        devman_handle_t dev_handle = IPC_GET_ARG1(*icall);
    273         devman_handle_t parent_fun_handle = IPC_GET_ARG2(*icall);
     273        devman_handle_t parent_fun_handle = IPC_GET_ARG2(*icall);
    274274       
    275275        ddf_dev_t *dev = create_device();
     
    288288        (void) parent_fun_handle;
    289289       
    290         res = driver->driver_ops->add_device(dev);
     290        res = driver->driver_ops->dev_add(dev);
    291291       
    292292        if (res != EOK) {
     
    301301       
    302302        async_answer_0(iid, res);
     303}
     304
     305static void driver_dev_added(ipc_callid_t iid, ipc_call_t *icall)
     306{
     307        fibril_mutex_lock(&devices_mutex);
     308        ddf_dev_t *dev = driver_get_device(IPC_GET_ARG1(*icall));
     309        fibril_mutex_unlock(&devices_mutex);
     310       
     311        if (dev != NULL && driver->driver_ops->device_added != NULL)
     312                driver->driver_ops->device_added(dev);
    303313}
    304314
     
    450460                case DRIVER_DEV_ADD:
    451461                        driver_dev_add(callid, &call);
     462                        break;
     463                case DRIVER_DEV_ADDED:
     464                        async_answer_0(callid, EOK);
     465                        driver_dev_added(callid, &call);
    452466                        break;
    453467                case DRIVER_DEV_REMOVE:
     
    956970       
    957971        match_id->id = str_dup(match_id_str);
    958         match_id->score = 90;
     972        match_id->score = match_score;
    959973       
    960974        add_match_id(&fun->match_ids, match_id);
Note: See TracChangeset for help on using the changeset viewer.