Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/devman.c

    r3ca3430 r96b02eb9  
    6262}
    6363
    64 static int devmap_devices_class_compare(unsigned long key[], hash_count_t keys,
    65     link_t *item)
    66 {
    67         dev_class_info_t *class_info
    68             = hash_table_get_instance(item, dev_class_info_t, devmap_link);
    69         assert(class_info != NULL);
    70 
    71         return (class_info->devmap_handle == (devmap_handle_t) key[0]);
    72 }
    73 
    7464static void devices_remove_callback(link_t *item)
    7565{
     
    8575        .hash = devices_hash,
    8676        .compare = devmap_devices_compare,
    87         .remove_callback = devices_remove_callback
    88 };
    89 
    90 static hash_table_operations_t devmap_devices_class_ops = {
    91         .hash = devices_hash,
    92         .compare = devmap_devices_class_compare,
    9377        .remove_callback = devices_remove_callback
    9478};
     
    686670        }
    687671       
    688         devmap_device_register_with_iface(devmap_pathname,
    689             &node->devmap_handle, DEVMAN_CONNECT_FROM_DEVMAP);
     672        devmap_device_register(devmap_pathname, &node->devmap_handle);
    690673       
    691674        tree_add_devmap_device(tree, node);
     
    10591042       
    10601043        info = (dev_class_info_t *) malloc(sizeof(dev_class_info_t));
    1061         if (info != NULL) {
     1044        if (info != NULL)
    10621045                memset(info, 0, sizeof(dev_class_info_t));
    1063                 list_initialize(&info->dev_classes);
    1064                 list_initialize(&info->devmap_link);
    1065                 list_initialize(&info->link);
    1066         }
    10671046       
    10681047        return info;
     
    11881167        fibril_rwlock_initialize(&class_list->rwlock);
    11891168        hash_table_create(&class_list->devmap_devices, DEVICE_BUCKETS, 1,
    1190             &devmap_devices_class_ops);
     1169            &devmap_devices_ops);
    11911170}
    11921171
     
    12361215        hash_table_insert(&class_list->devmap_devices, &key, &cli->devmap_link);
    12371216        fibril_rwlock_write_unlock(&class_list->rwlock);
    1238 
    1239         assert(find_devmap_class_device(class_list, cli->devmap_handle) != NULL);
    12401217}
    12411218
Note: See TracChangeset for help on using the changeset viewer.