MCPcopy Index your code
hub / github.com/F-Stack/f-stack / root_bus_module_handler

Function root_bus_module_handler

freebsd/kern/subr_bus.c:5162–5186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5160devclass_t root_devclass;
5161
5162static int
5163root_bus_module_handler(module_t mod, int what, void* arg)
5164{
5165 switch (what) {
5166 case MOD_LOAD:
5167 TAILQ_INIT(&bus_data_devices);
5168 kobj_class_compile((kobj_class_t) &root_driver);
5169 root_bus = make_device(NULL, "root", 0);
5170 root_bus->desc = "System root bus";
5171 kobj_init((kobj_t) root_bus, (kobj_class_t) &root_driver);
5172 root_bus->driver = &root_driver;
5173 root_bus->state = DS_ATTACHED;
5174 root_devclass = devclass_find_internal("root", NULL, FALSE);
5175 devinit();
5176 return (0);
5177
5178 case MOD_SHUTDOWN:
5179 device_shutdown(root_bus);
5180 return (0);
5181 default:
5182 return (EOPNOTSUPP);
5183 }
5184
5185 return (0);
5186}
5187
5188static moduledata_t root_bus_mod = {
5189 "rootbus",

Callers

nothing calls this directly

Calls 6

kobj_class_compileFunction · 0.85
make_deviceFunction · 0.85
kobj_initFunction · 0.85
devclass_find_internalFunction · 0.85
devinitFunction · 0.85
device_shutdownFunction · 0.85

Tested by

no test coverage detected