* 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:
@@ -1317,15 +1317,12 @@ device_node::Register(device_node* parent)
|
|||||||
// We don't uninitialize the driver - this is done by the caller
|
// We don't uninitialize the driver - this is done by the caller
|
||||||
// in order to save reinitializing during driver loading.
|
// in order to save reinitializing during driver loading.
|
||||||
|
|
||||||
uint32 registered;
|
uint32 registeredFixedCount;
|
||||||
status = _RegisterFixed(registered);
|
status = _RegisterFixed(registeredFixedCount);
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
UninitUnusedDriver();
|
UninitUnusedDriver();
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
if (registered > 0) {
|
|
||||||
fRegistered = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Register the children the driver wants
|
// 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
|
// Register all possible child device nodes
|
||||||
|
|
||||||
status = _RegisterDynamic();
|
status = _RegisterDynamic();
|
||||||
|
|||||||
Reference in New Issue
Block a user