Changeset 58b833c in mainline for uspace/srv/devman/devman.h
- Timestamp:
- 2010-10-23T13:43:51Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1b11576d, c6c389ed
- Parents:
- 667eac4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.h
r667eac4 r58b833c 222 222 } dev_class_t; 223 223 224 /** Provides n-to-m mapping between device nodes and classes - each device may 224 /** 225 * Provides n-to-m mapping between device nodes and classes - each device may 225 226 * be register to the arbitrary number of classes and each class may contain 226 227 * the arbitrary number of devices. … … 290 291 static inline void init_driver_list(driver_list_t *drv_list) 291 292 { 292 assert( NULL != drv_list);293 assert(drv_list != NULL); 293 294 294 295 list_initialize(&drv_list->drivers); … … 348 349 static inline void delete_driver(driver_t *drv) 349 350 { 350 assert( NULL != drv);351 assert(drv != NULL); 351 352 352 353 clean_driver(drv); … … 382 383 { 383 384 assert(list_empty(&node->children)); 384 assert( NULL == node->parent);385 assert( NULL == node->drv);385 assert(node->parent == NULL); 386 assert(node->drv == NULL); 386 387 387 388 clean_match_ids(&node->match_ids); … … 399 400 * @return The device node. 400 401 */ 401 static inline node_t * 402 find_dev_node_no_lock(dev_tree_t *tree,device_handle_t handle)402 static inline node_t *find_dev_node_no_lock(dev_tree_t *tree, 403 device_handle_t handle) 403 404 { 404 405 unsigned long key = handle; … … 413 414 * @return The device node. 414 415 */ 415 static inline node_t * 416 find_dev_node(dev_tree_t *tree, device_handle_t handle) 416 static inline node_t *find_dev_node(dev_tree_t *tree, device_handle_t handle) 417 417 { 418 418 node_t *node = NULL; … … 440 440 /** Create device class. 441 441 * 442 * @return 442 * @return Device class. 443 443 */ 444 444 static inline dev_class_t *create_dev_class(void) … … 447 447 448 448 cl = (dev_class_t *) malloc(sizeof(dev_class_t)); 449 if ( NULL != cl) {449 if (cl != NULL) { 450 450 memset(cl, 0, sizeof(dev_class_t)); 451 451 list_initialize(&cl->devices); … … 465 465 466 466 info = (dev_class_info_t *) malloc(sizeof(dev_class_info_t)); 467 if ( NULL != info)467 if (info != NULL) 468 468 memset(info, 0, sizeof(dev_class_info_t)); 469 469 … … 491 491 extern dev_class_t *find_dev_class_no_lock(class_list_t *, const char *); 492 492 493 static inline void 494 add_dev_class_no_lock(class_list_t *class_list,dev_class_t *cl)493 static inline void add_dev_class_no_lock(class_list_t *class_list, 494 dev_class_t *cl) 495 495 { 496 496 list_append(&cl->link, &class_list->classes); … … 503 503 extern node_t *find_devmap_class_device(class_list_t *, dev_handle_t); 504 504 505 static inline void 506 class_add_devmap_device(class_list_t *class_list,dev_class_info_t *cli)505 static inline void class_add_devmap_device(class_list_t *class_list, 506 dev_class_info_t *cli) 507 507 { 508 508 unsigned long key = (unsigned long) cli->devmap_handle;
Note:
See TracChangeset
for help on using the changeset viewer.