Changeset 7707954 in mainline for uspace/lib/libdrv/include/driver.h


Ignore:
Timestamp:
2010-03-18T21:20:17Z (14 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bda60d9
Parents:
084ff99
Message:

child device registration - parts of code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libdrv/include/driver.h

    r084ff99 r7707954  
    3838#include <adt/list.h>
    3939
    40 
    41 
    4240typedef struct device {
    4341        long handle;
     
    6159int driver_main(driver_t *drv);
    6260
     61static inline device_t * create_device()
     62{
     63        device_t *dev = malloc(sizeof(device_t));
     64        if (NULL != dev) {
     65                memset(dev, 0, sizeof(device_t));
     66        }
     67       
     68        return dev;
     69}
     70
     71bool child_device_register(device_t *child, const char *child_name, device_t *parent);
     72
     73
     74
    6375#endif
    6476
Note: See TracChangeset for help on using the changeset viewer.