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


Ignore:
Timestamp:
2011-02-14T21:41:50Z (14 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/ns8250/ns8250.c

    r7df0477e r97a62fe  
    761761        }
    762762       
    763         fun = create_function();
    764         fun->ftype = fun_exposed;
    765         fun->name = "a";
     763        fun = ddf_fun_create(dev, fun_exposed, "a");
     764        if (fun == NULL) {
     765                printf(NAME ": error creating function.\n");
     766                goto fail;
     767        }
    766768       
    767769        /* Set device operations. */
    768770        fun->ops = &ns8250_dev_ops;
    769         register_function(fun, dev);
     771        rc = ddf_fun_bind(fun);
     772        if (rc != EOK) {
     773                printf(NAME ": error binding function.\n");
     774                goto fail;
     775        }
     776
    770777        ns->fun = fun;
    771778       
     
    777784        return EOK;
    778785fail:
     786        if (fun != NULL)
     787                ddf_fun_destroy(fun);
    779788        if (need_cleanup)
    780789                ns8250_dev_cleanup(ns);
Note: See TracChangeset for help on using the changeset viewer.