Changes in uspace/lib/drv/generic/driver.c [ef9460b:45059d6b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
ref9460b r45059d6b 428 428 static void driver_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) 429 429 { 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 430 440 /* Select interface */ 431 switch ( (sysarg_t) (IPC_GET_ARG1(*icall))) {441 switch (conn_type) { 432 442 case DRIVER_DEVMAN: 433 443 /* Handle request from device manager */ … … 582 592 int ddf_fun_bind(ddf_fun_t *fun) 583 593 { 594 assert(fun->bound == false); 584 595 assert(fun->name != NULL); 585 596 … … 598 609 } 599 610 611 /** Unbind a function node. 612 * 613 * Unbind the specified function from the system. This effectively makes 614 * the function invisible to the system. 615 * 616 * @param fun Function to bind 617 * @return EOK on success or negative error code 618 */ 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 600 636 /** Add single match ID to inner function. 601 637 * … … 635 671 } 636 672 637 /** Add exposed function to c lass.673 /** Add exposed function to category. 638 674 * 639 675 * Must only be called when the function is bound. 640 676 */ 641 int ddf_fun_add_to_c lass(ddf_fun_t *fun, const char *class_name)677 int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name) 642 678 { 643 679 assert(fun->bound == true); 644 680 assert(fun->ftype == fun_exposed); 645 681 646 return devman_add_device_to_c lass(fun->handle, class_name);682 return devman_add_device_to_category(fun->handle, cat_name); 647 683 } 648 684
Note:
See TracChangeset
for help on using the changeset viewer.