Changes in uspace/srv/devman/devman.c [3ca3430:96b02eb9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
r3ca3430 r96b02eb9 62 62 } 63 63 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_info68 = 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 74 64 static void devices_remove_callback(link_t *item) 75 65 { … … 85 75 .hash = devices_hash, 86 76 .compare = devmap_devices_compare, 87 .remove_callback = devices_remove_callback88 };89 90 static hash_table_operations_t devmap_devices_class_ops = {91 .hash = devices_hash,92 .compare = devmap_devices_class_compare,93 77 .remove_callback = devices_remove_callback 94 78 }; … … 686 670 } 687 671 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); 690 673 691 674 tree_add_devmap_device(tree, node); … … 1059 1042 1060 1043 info = (dev_class_info_t *) malloc(sizeof(dev_class_info_t)); 1061 if (info != NULL) {1044 if (info != NULL) 1062 1045 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 }1067 1046 1068 1047 return info; … … 1188 1167 fibril_rwlock_initialize(&class_list->rwlock); 1189 1168 hash_table_create(&class_list->devmap_devices, DEVICE_BUCKETS, 1, 1190 &devmap_devices_ class_ops);1169 &devmap_devices_ops); 1191 1170 } 1192 1171 … … 1236 1215 hash_table_insert(&class_list->devmap_devices, &key, &cli->devmap_link); 1237 1216 fibril_rwlock_write_unlock(&class_list->rwlock); 1238 1239 assert(find_devmap_class_device(class_list, cli->devmap_handle) != NULL);1240 1217 } 1241 1218
Note:
See TracChangeset
for help on using the changeset viewer.