* While it's okay to allow nodes with fixed children to register their own

children, you either have dynamic or fixed children, never both.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25801 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-06-04 10:50:06 +00:00
parent 0dedf9f081
commit fd7ff3cfc8
1 changed files with 9 additions and 5 deletions

View File

@ -1317,15 +1317,12 @@ device_node::Register(device_node* parent)
// We don't uninitialize the driver - this is done by the caller
// in order to save reinitializing during driver loading.
uint32 registered;
status = _RegisterFixed(registered);
uint32 registeredFixedCount;
status = _RegisterFixed(registeredFixedCount);
if (status != B_OK) {
UninitUnusedDriver();
return status;
}
if (registered > 0) {
fRegistered = true;
}
// Register the children the driver wants
@ -1342,6 +1339,13 @@ device_node::Register(device_node* parent)
}
}
if (registeredFixedCount > 0) {
// Nodes with fixed children cannot have any dynamic children, so bail
// out here
fRegistered = true;
return B_OK;
}
// Register all possible child device nodes
status = _RegisterDynamic();