Changeset 97a62fe in mainline for uspace/drv/rootpc/rootpc.c


Ignore:
Timestamp:
2011-02-14T21:41:50Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cd0684d
Parents:
7df0477e
Message:

Refactor create_function(), delete_function() and register_function() into
ddf_fun_create(), ddf_fun_destroy() and ddf_fun_bind(). This is not just
a rename.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/rootpc/rootpc.c

    r7df0477e r97a62fe  
    125125       
    126126        /* Create new device. */
    127         fnode = create_function();
     127        fnode = ddf_fun_create(dev, fun_inner, name);
    128128        if (fnode == NULL)
    129129                goto failure;
    130130       
    131         fnode->name = name;
    132131        fnode->driver_data = fun;
    133         fnode->ftype = fun_inner;
    134132       
    135133        /* Initialize match id list */
     
    146144       
    147145        /* Register function. */
    148         if (register_function(fnode, dev) != EOK)
     146        if (ddf_fun_bind(fnode) != EOK) {
     147                printf(NAME ": error binding function %s.\n", name);
    149148                goto failure;
     149        }
    150150        printf(NAME ": registered function handle = %u\n", fnode->handle);
    151151       
     
    156156                match_id->id = NULL;
    157157       
    158         if (fnode != NULL) {
    159                 fnode->name = NULL;
    160                 delete_function(fnode);
    161         }
     158        if (fnode != NULL)
     159                ddf_fun_destroy(fnode);
    162160       
    163161        printf(NAME ": failed to add function '%s'.\n", name);
Note: See TracChangeset for help on using the changeset viewer.