Changeset bda60d9 in mainline for uspace/lib/libdrv/generic/driver.c


Ignore:
Timestamp:
2010-03-19T14:40:14Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d347b53
Parents:
7707954
Message:

adding child device - parts of code

File:
1 edited

Legend:

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

    r7707954 rbda60d9  
    7272        // result of the operation - device was added, device is not present etc.
    7373        ipcarg_t ret = 0;       
    74         ipcarg_t dev_handle =  IPC_GET_ARG1(*icall);
     74        device_handle_t dev_handle =  IPC_GET_ARG1(*icall);
    7575       
    7676        printf("%s: adding device with handle = %x \n", driver->name, dev_handle);
     
    109109                                ipc_answer_0(callid, ENOENT);
    110110                }
    111         }
    112        
     111        }       
    113112}
    114113
     
    150149}
    151150
    152 bool child_device_register(device_t *child, const char *child_name, device_t *parent)
     151bool child_device_register(device_t *child, device_t *parent)
    153152{
    154         if (devman_child_device_register(child_name, parent->handle, &child->handle)) {
     153        printf("%s: child_device_register\n", driver->name);
     154       
     155        assert(NULL != child->name);
     156       
     157        if (devman_child_device_register(child->name, &child->match_ids, parent->handle, &child->handle)) {
    155158                // TODO initialize child device
    156159                return true;
Note: See TracChangeset for help on using the changeset viewer.