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


Ignore:
Timestamp:
2011-08-18T20:27:02Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
be79a663
Parents:
0cc32f2 (diff), ef7052ec (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

    r0cc32f2 rd7427a7e  
    582582int ddf_fun_bind(ddf_fun_t *fun)
    583583{
     584        assert(fun->bound == false);
    584585        assert(fun->name != NULL);
    585586       
     
    596597        fun->bound = true;
    597598        return res;
     599}
     600
     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;
    598624}
    599625
Note: See TracChangeset for help on using the changeset viewer.