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