Lines Matching refs:root
63 device_t root = device_add_child(NULL, NULL, 0);
64 if (root == NULL)
67 root->softc = malloc(sizeof(struct root_device_softc));
68 if (root->softc == NULL) {
69 device_delete_child(NULL, root);
73 bzero(root->softc, sizeof(struct root_device_softc));
76 root->driver = &sRootDriverPCI;
78 root->driver = &sRootDriverUSB;
81 ((struct root_device_softc*)root->softc)->bus = bus_type;
83 root->root = root;
86 *_root = root;
93 add_child_device(driver_t* driver, device_t root, device_t* _child)
95 device_t child = device_add_child_driver(root, driver->name, driver, 0);
130 device_t root;
140 status = init_root_device(&root, BUS_pci);
145 for (info = get_device_pci_info(root); gPci->get_nth_pci_info(i, info) == B_OK; i++) {
152 status = add_child_device(drivers[index], root, &device);
163 device_delete_child(root, device);
184 device_delete_child(NULL, root);
198 device_t root;
208 status = init_root_device(&root, BUS_uhub);
227 status = add_child_device(drivers[index], root, &device);
240 device_delete_child(root, device);
260 device_delete_child(NULL, root);
317 device_t root, device = NULL;
318 status = init_root_device(&root, sProbedDevices[p].bus);
323 pci_info* info = get_device_pci_info(root);
326 struct root_device_softc* root_softc = (struct root_device_softc*)root->softc;
330 status = add_child_device(sProbedDevices[p].driver, root, &device);
344 device_delete_child(NULL, root);