Ignore:
File:
1 edited

Legend:

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

    ref9460b r45059d6b  
    428428static void driver_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    429429{
     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
    430440        /* Select interface */
    431         switch ((sysarg_t) (IPC_GET_ARG1(*icall))) {
     441        switch (conn_type) {
    432442        case DRIVER_DEVMAN:
    433443                /* Handle request from device manager */
     
    582592int ddf_fun_bind(ddf_fun_t *fun)
    583593{
     594        assert(fun->bound == false);
    584595        assert(fun->name != NULL);
    585596       
     
    598609}
    599610
     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 */
     619int 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
    600636/** Add single match ID to inner function.
    601637 *
     
    635671}
    636672
    637 /** Add exposed function to class.
     673/** Add exposed function to category.
    638674 *
    639675 * Must only be called when the function is bound.
    640676 */
    641 int ddf_fun_add_to_class(ddf_fun_t *fun, const char *class_name)
     677int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name)
    642678{
    643679        assert(fun->bound == true);
    644680        assert(fun->ftype == fun_exposed);
    645681       
    646         return devman_add_device_to_class(fun->handle, class_name);
     682        return devman_add_device_to_category(fun->handle, cat_name);
    647683}
    648684
Note: See TracChangeset for help on using the changeset viewer.