mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[NTOSKRNL]
- Fix linking of device children to respect the enumeration order instead of linking in reverse enumeration order - PCI cards (and other devices) now enumerate in the correct order svn path=/trunk/; revision=55912
This commit is contained in:
parent
4ba7e8a742
commit
bf426aafef
1 changed files with 9 additions and 2 deletions
|
@ -1128,10 +1128,17 @@ IopCreateDeviceNode(PDEVICE_NODE ParentNode,
|
|||
{
|
||||
KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql);
|
||||
Node->Parent = ParentNode;
|
||||
Node->Sibling = ParentNode->Child;
|
||||
ParentNode->Child = Node;
|
||||
Node->Sibling = NULL;
|
||||
if (ParentNode->LastChild == NULL)
|
||||
{
|
||||
ParentNode->Child = Node;
|
||||
ParentNode->LastChild = Node;
|
||||
}
|
||||
else
|
||||
{
|
||||
ParentNode->LastChild->Sibling = Node;
|
||||
ParentNode->LastChild = Node;
|
||||
}
|
||||
KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql);
|
||||
Node->Level = ParentNode->Level + 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue