Changeset 46b881c in mainline for uspace/lib/drv/generic/driver.c
- Timestamp:
- 2011-01-29T11:36:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0b6931a, 8add9ca5
- Parents:
- e26a4633 (diff), ffa2c8ef (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
re26a4633 r46b881c 186 186 pseudocode = &default_pseudocode; 187 187 188 int res = ipc_register_irq(irq, dev->handle, ctx->id, pseudocode);188 int res = register_irq(irq, dev->handle, ctx->id, pseudocode); 189 189 if (res != EOK) { 190 190 remove_interrupt_context(&interrupt_contexts, ctx); … … 199 199 interrupt_context_t *ctx = find_interrupt_context(&interrupt_contexts, 200 200 dev, irq); 201 int res = ipc_unregister_irq(irq, dev->handle);201 int res = unregister_irq(irq, dev->handle); 202 202 203 203 if (ctx != NULL) { … … 272 272 } 273 273 274 ipc_answer_0(iid, res);274 async_answer_0(iid, res); 275 275 } 276 276 … … 278 278 { 279 279 /* Accept connection */ 280 ipc_answer_0(iid, EOK);280 async_answer_0(iid, EOK); 281 281 282 282 bool cont = true; … … 293 293 break; 294 294 default: 295 ipc_answer_0(callid, ENOENT);295 async_answer_0(callid, ENOENT); 296 296 } 297 297 } … … 316 316 printf("%s: driver_connection_gen error - no device with handle" 317 317 " %" PRIun " was found.\n", driver->name, handle); 318 ipc_answer_0(iid, ENOENT);318 async_answer_0(iid, ENOENT); 319 319 return; 320 320 } … … 331 331 ret = (*dev->ops->open)(dev); 332 332 333 ipc_answer_0(iid, ret);333 async_answer_0(iid, ret); 334 334 if (ret != EOK) 335 335 return; … … 347 347 if (dev->ops != NULL && dev->ops->close != NULL) 348 348 (*dev->ops->close)(dev); 349 ipc_answer_0(callid, EOK);349 async_answer_0(callid, EOK); 350 350 return; 351 351 default: … … 368 368 "invalid interface id %d.", 369 369 driver->name, iface_idx); 370 ipc_answer_0(callid, ENOTSUP);370 async_answer_0(callid, ENOTSUP); 371 371 break; 372 372 } … … 381 381 printf("device with handle %" PRIun " has no interface " 382 382 "with id %d.\n", handle, iface_idx); 383 ipc_answer_0(callid, ENOTSUP);383 async_answer_0(callid, ENOTSUP); 384 384 break; 385 385 } … … 400 400 printf("%s: driver_connection_gen error - " 401 401 "invalid interface method.", driver->name); 402 ipc_answer_0(callid, ENOTSUP);402 async_answer_0(callid, ENOTSUP); 403 403 break; 404 404 } … … 446 446 default: 447 447 /* No such interface */ 448 ipc_answer_0(iid, ENOENT);448 async_answer_0(iid, ENOENT); 449 449 } 450 450 }
Note:
See TracChangeset
for help on using the changeset viewer.