Changeset 8b1e15ac in mainline for uspace/drv/test2/test2.c


Ignore:
Timestamp:
2011-02-11T22:26:36Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
68414f4a
Parents:
1b367b4
Message:

Finish splitting device node: devman client in C library, drv library. Update device drivers accordingly.

File:
1 edited

Legend:

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

    r1b367b4 r8b1e15ac  
    6363           name, message);
    6464
    65         int rc = child_device_register_wrapper(parent, name,
     65        int rc = register_function_wrapper(parent, name,
    6666            match_id, match_score);
    6767
     
    8282{
    8383        device_t *dev = (device_t *) arg;
     84        function_t *fun;
    8485
    8586        async_usleep(1000);
     
    9091            "test1", "virtual&test1", 10);
    9192
    92         add_device_to_class(dev, "virtual");
     93        fun = create_function();
     94        fun->ftype = fun_exposed;
     95        fun->name = "a";
     96
     97        register_function(fun, dev);
     98
     99        add_function_to_class(fun, "virtual");
    93100
    94101        return EOK;
    95102}
    96 
    97103
    98104static int add_device(device_t *dev)
     
    101107            dev->name, (int) dev->handle);
    102108
    103         if (dev->parent == NULL) {
     109        if (str_cmp(dev->name, "child") != 0) {
    104110                fid_t postpone = fibril_create(postponed_birth, dev);
    105111                if (postpone == 0) {
Note: See TracChangeset for help on using the changeset viewer.