mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:12:57 +00:00
[DRIVERS] Use IoForwardIrpSynchronously in drivers
Instead of having an own routine in each driver IoForwardIrpSynchronously can be used.
This commit is contained in:
parent
8e8f61989a
commit
7ed1883c8e
45 changed files with 238 additions and 866 deletions
|
@ -263,6 +263,7 @@ ProcessorPnp(
|
|||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PDEVICE_EXTENSION DeviceExtension;
|
||||
PIO_STACK_LOCATION IrpSp;
|
||||
ULONG_PTR Information = 0;
|
||||
NTSTATUS Status = STATUS_NOT_SUPPORTED;
|
||||
|
@ -277,12 +278,18 @@ ProcessorPnp(
|
|||
DPRINT(" IRP_MN_START_DEVICE received\n");
|
||||
|
||||
/* Call lower driver */
|
||||
Status = ForwardIrpAndWait(DeviceObject, Irp);
|
||||
if (NT_SUCCESS(Status))
|
||||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
|
||||
if (IoForwardIrpSynchronously(DeviceExtension->LowerDevice, Irp))
|
||||
{
|
||||
Status = ProcessorStartDevice(DeviceObject,
|
||||
IrpSp->Parameters.StartDevice.AllocatedResources,
|
||||
IrpSp->Parameters.StartDevice.AllocatedResourcesTranslated);
|
||||
Status = Irp->IoStatus.Status;
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
Status = ProcessorStartDevice(DeviceObject,
|
||||
IrpSp->Parameters.StartDevice.AllocatedResources,
|
||||
IrpSp->Parameters.StartDevice.AllocatedResourcesTranslated);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue