Changes in uspace/lib/drv/generic/driver.c [a996ae31:80a96d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
ra996ae31 r80a96d2 80 80 81 81 static irq_code_t default_pseudocode = { 82 0,83 NULL,84 82 sizeof(default_cmds) / sizeof(irq_cmd_t), 85 83 default_cmds … … 200 198 pseudocode = &default_pseudocode; 201 199 202 int res = irq_register(irq, dev->handle, ctx->id, pseudocode);200 int res = register_irq(irq, dev->handle, ctx->id, pseudocode); 203 201 if (res != EOK) { 204 202 remove_interrupt_context(&interrupt_contexts, ctx); … … 213 211 interrupt_context_t *ctx = find_interrupt_context(&interrupt_contexts, 214 212 dev, irq); 215 int res = irq_unregister(irq, dev->handle);213 int res = unregister_irq(irq, dev->handle); 216 214 217 215 if (ctx != NULL) { … … 273 271 274 272 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); 276 274 277 275 ddf_dev_t *dev = create_device(); … … 290 288 (void) parent_fun_handle; 291 289 292 res = driver->driver_ops-> dev_add(dev);290 res = driver->driver_ops->add_device(dev); 293 291 294 292 if (res != EOK) { … … 303 301 304 302 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);315 303 } 316 304 … … 462 450 case DRIVER_DEV_ADD: 463 451 driver_dev_add(callid, &call); 464 break;465 case DRIVER_DEV_ADDED:466 async_answer_0(callid, EOK);467 driver_dev_added(callid, &call);468 452 break; 469 453 case DRIVER_DEV_REMOVE: … … 972 956 973 957 match_id->id = str_dup(match_id_str); 974 match_id->score = match_score;958 match_id->score = 90; 975 959 976 960 add_match_id(&fun->match_ids, match_id); … … 1018 1002 * incoming connections. 1019 1003 */ 1020 async_set_client_connection(driver_connection); 1021 rc = devman_driver_register(driver->name); 1004 rc = devman_driver_register(driver->name, driver_connection); 1022 1005 if (rc != EOK) { 1023 1006 printf("Error: Failed to register driver with device manager "
Note:
See TracChangeset
for help on using the changeset viewer.