Changeset 903bac0a in mainline for uspace/lib/drv/generic/driver.c


Ignore:
Timestamp:
2011-08-19T09:00:38Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e2ab36f1
Parents:
d894fbd (diff), 42a619b (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    rd894fbd r903bac0a  
    582582int ddf_fun_bind(ddf_fun_t *fun)
    583583{
     584        assert(fun->bound == false);
    584585        assert(fun->name != NULL);
    585586       
     
    598599}
    599600
     601/** Unbind a function node.
     602 *
     603 * Unbind the specified function from the system. This effectively makes
     604 * the function invisible to the system.
     605 *
     606 * @param fun           Function to bind
     607 * @return              EOK on success or negative error code
     608 */
     609int ddf_fun_unbind(ddf_fun_t *fun)
     610{
     611        int res;
     612       
     613        assert(fun->bound == true);
     614       
     615        add_to_functions_list(fun);
     616        res = devman_remove_function(fun->handle);
     617        if (res != EOK)
     618                return res;
     619
     620        remove_from_functions_list(fun);
     621       
     622        fun->bound = false;
     623        return EOK;
     624}
     625
    600626/** Add single match ID to inner function.
    601627 *
     
    635661}
    636662
    637 /** Add exposed function to class.
     663/** Add exposed function to category.
    638664 *
    639665 * Must only be called when the function is bound.
    640666 */
    641 int ddf_fun_add_to_class(ddf_fun_t *fun, const char *class_name)
     667int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name)
    642668{
    643669        assert(fun->bound == true);
    644670        assert(fun->ftype == fun_exposed);
    645671       
    646         return devman_add_device_to_class(fun->handle, class_name);
     672        return devman_add_device_to_category(fun->handle, cat_name);
    647673}
    648674
Note: See TracChangeset for help on using the changeset viewer.