mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
Do not create a new device node if we already know the PDO
svn path=/trunk/; revision=27153
This commit is contained in:
parent
5b7bb95ec1
commit
ad0d69c348
3 changed files with 7 additions and 2 deletions
|
@ -135,7 +135,7 @@ IopGetDriverObject(
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to reference driver object, status=0x%08x\n", Status);
|
DPRINT("Failed to reference driver object, status=0x%08x\n", Status);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -694,7 +694,7 @@ IopDeviceStatus(PPLUGPLAY_CONTROL_STATUS_DATA StatusData)
|
||||||
if (DeviceObject == NULL)
|
if (DeviceObject == NULL)
|
||||||
return STATUS_NO_SUCH_DEVICE;
|
return STATUS_NO_SUCH_DEVICE;
|
||||||
|
|
||||||
DeviceNode = ((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->DeviceNode;
|
DeviceNode = IopGetDeviceNode(DeviceObject);
|
||||||
|
|
||||||
switch (Operation)
|
switch (Operation)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2574,6 +2574,11 @@ IopInvalidateDeviceRelations(
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < DeviceRelations->Count; i++)
|
for (i = 0; i < DeviceRelations->Count; i++)
|
||||||
{
|
{
|
||||||
|
if (IopGetDeviceNode(DeviceRelations->Objects[i]) != NULL)
|
||||||
|
{
|
||||||
|
ObDereferenceObject(DeviceRelations->Objects[i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Status = IopCreateDeviceNode(
|
Status = IopCreateDeviceNode(
|
||||||
DeviceNode,
|
DeviceNode,
|
||||||
DeviceRelations->Objects[i],
|
DeviceRelations->Objects[i],
|
||||||
|
|
Loading…
Reference in a new issue