Changes in uspace/lib/drv/generic/driver.c [45059d6b:b72efe8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
r45059d6b rb72efe8 314 314 " %" PRIun " was found.\n", driver->name, handle); 315 315 async_answer_0(iid, ENOENT); 316 return;317 }318 319 if (fun->conn_handler != NULL) {320 /* Driver has a custom connection handler. */321 (*fun->conn_handler)(iid, icall, (void *)fun);322 316 return; 323 317 } … … 428 422 static void driver_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) 429 423 { 430 sysarg_t conn_type;431 432 if (iid == 0) {433 /* Callback connection from devman */434 /* XXX Use separate handler for this type of connection */435 conn_type = DRIVER_DEVMAN;436 } else {437 conn_type = IPC_GET_ARG1(*icall);438 }439 440 424 /* Select interface */ 441 switch ( conn_type) {425 switch ((sysarg_t) (IPC_GET_ARG1(*icall))) { 442 426 case DRIVER_DEVMAN: 443 427 /* Handle request from device manager */ … … 592 576 int ddf_fun_bind(ddf_fun_t *fun) 593 577 { 594 assert(fun->bound == false);595 578 assert(fun->name != NULL); 596 579 … … 609 592 } 610 593 611 /** Unbind a function node.612 *613 * Unbind the specified function from the system. This effectively makes614 * the function invisible to the system.615 *616 * @param fun Function to bind617 * @return EOK on success or negative error code618 */619 int ddf_fun_unbind(ddf_fun_t *fun)620 {621 int res;622 623 assert(fun->bound == true);624 625 add_to_functions_list(fun);626 res = devman_remove_function(fun->handle);627 if (res != EOK)628 return res;629 630 remove_from_functions_list(fun);631 632 fun->bound = false;633 return EOK;634 }635 636 594 /** Add single match ID to inner function. 637 595 * … … 656 614 return ENOMEM; 657 615 658 match_id->id = str_dup(match_id_str);616 match_id->id = match_id_str; 659 617 match_id->score = 90; 660 618 … … 671 629 } 672 630 673 /** Add exposed function to c ategory.631 /** Add exposed function to class. 674 632 * 675 633 * Must only be called when the function is bound. 676 634 */ 677 int ddf_fun_add_to_c ategory(ddf_fun_t *fun, const char *cat_name)635 int ddf_fun_add_to_class(ddf_fun_t *fun, const char *class_name) 678 636 { 679 637 assert(fun->bound == true); 680 638 assert(fun->ftype == fun_exposed); 681 639 682 return devman_add_device_to_c ategory(fun->handle, cat_name);640 return devman_add_device_to_class(fun->handle, class_name); 683 641 } 684 642
Note:
See TracChangeset
for help on using the changeset viewer.