mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[HALX86] Report HAL root device to the stack before passing it to the driver
PnP manager now correctly delays device actions if needed, so this can be safely done as a one operation (IoReportDetectedDevice itself creates a PDO for us if not passed) CORE-10456
This commit is contained in:
parent
2839c85092
commit
8aff2c9de7
2 changed files with 18 additions and 36 deletions
|
@ -862,14 +862,15 @@ HalpDriverEntry(IN PDRIVER_OBJECT DriverObject,
|
||||||
DriverObject->MajorFunction[IRP_MJ_POWER] = HalpDispatchPower;
|
DriverObject->MajorFunction[IRP_MJ_POWER] = HalpDispatchPower;
|
||||||
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = HalpDispatchWmi;
|
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = HalpDispatchWmi;
|
||||||
|
|
||||||
/* Create the PDO */
|
/* Create the PDO and tell the PnP manager about us*/
|
||||||
Status = IoCreateDevice(DriverObject,
|
Status = IoReportDetectedDevice(DriverObject,
|
||||||
0,
|
InterfaceTypeUndefined,
|
||||||
NULL,
|
-1,
|
||||||
FILE_DEVICE_CONTROLLER,
|
-1,
|
||||||
0,
|
NULL,
|
||||||
FALSE,
|
NULL,
|
||||||
&TargetDevice);
|
FALSE,
|
||||||
|
&TargetDevice);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
|
@ -883,16 +884,6 @@ HalpDriverEntry(IN PDRIVER_OBJECT DriverObject,
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tell the PnP manager about us */
|
|
||||||
Status = IoReportDetectedDevice(DriverObject,
|
|
||||||
InterfaceTypeUndefined,
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
FALSE,
|
|
||||||
&TargetDevice);
|
|
||||||
|
|
||||||
/* Return to kernel */
|
/* Return to kernel */
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -888,14 +888,15 @@ HalpDriverEntry(IN PDRIVER_OBJECT DriverObject,
|
||||||
DriverObject->MajorFunction[IRP_MJ_POWER] = HalpDispatchPower;
|
DriverObject->MajorFunction[IRP_MJ_POWER] = HalpDispatchPower;
|
||||||
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = HalpDispatchWmi;
|
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = HalpDispatchWmi;
|
||||||
|
|
||||||
/* Create the PDO */
|
/* Create the PDO and tell the PnP manager about us*/
|
||||||
Status = IoCreateDevice(DriverObject,
|
Status = IoReportDetectedDevice(DriverObject,
|
||||||
0,
|
InterfaceTypeUndefined,
|
||||||
NULL,
|
-1,
|
||||||
FILE_DEVICE_CONTROLLER,
|
-1,
|
||||||
0,
|
NULL,
|
||||||
FALSE,
|
NULL,
|
||||||
&TargetDevice);
|
FALSE,
|
||||||
|
&TargetDevice);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
|
@ -909,16 +910,6 @@ HalpDriverEntry(IN PDRIVER_OBJECT DriverObject,
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tell the PnP manager about us */
|
|
||||||
Status = IoReportDetectedDevice(DriverObject,
|
|
||||||
InterfaceTypeUndefined,
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
FALSE,
|
|
||||||
&TargetDevice);
|
|
||||||
|
|
||||||
/* Return to kernel */
|
/* Return to kernel */
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue