mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[HDAUDBUS] Use IoForwardIrpSynchronously instead of HDA_SyncForwardIrp.
This commit is contained in:
parent
789cfd3ddc
commit
b05e5b0340
3 changed files with 6 additions and 64 deletions
|
@ -540,7 +540,12 @@ HDA_FDOStartDevice(
|
|||
ASSERT(DeviceExtension->IsFDO == TRUE);
|
||||
|
||||
/* forward irp to lower device */
|
||||
Status = HDA_SyncForwardIrp(DeviceExtension->LowerDevice, Irp);
|
||||
if (!IoForwardIrpSynchronously(DeviceExtension->LowerDevice, Irp))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return STATUS_INVALID_DEVICE_REQUEST;
|
||||
}
|
||||
Status = Irp->IoStatus.Status;
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
// failed to start
|
||||
|
|
|
@ -31,60 +31,6 @@ FreeItem(
|
|||
ExFreePool(Item);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HDA_SyncForwardIrpCompletionRoutine(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
IN PVOID Context)
|
||||
{
|
||||
if (Irp->PendingReturned)
|
||||
{
|
||||
KeSetEvent((PKEVENT)Context, IO_NO_INCREMENT, FALSE);
|
||||
}
|
||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HDA_SyncForwardIrp(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
KEVENT Event;
|
||||
NTSTATUS Status;
|
||||
|
||||
/* Initialize event */
|
||||
KeInitializeEvent(&Event, NotificationEvent, FALSE);
|
||||
|
||||
/* Copy irp stack location */
|
||||
IoCopyCurrentIrpStackLocationToNext(Irp);
|
||||
|
||||
/* Set completion routine */
|
||||
IoSetCompletionRoutine(Irp,
|
||||
HDA_SyncForwardIrpCompletionRoutine,
|
||||
&Event,
|
||||
TRUE,
|
||||
TRUE,
|
||||
TRUE);
|
||||
|
||||
/* Call driver */
|
||||
Status = IoCallDriver(DeviceObject, Irp);
|
||||
|
||||
/* Check if pending */
|
||||
if (Status == STATUS_PENDING)
|
||||
{
|
||||
/* Wait for the request to finish */
|
||||
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
|
||||
|
||||
/* Copy status code */
|
||||
Status = Irp->IoStatus.Status;
|
||||
}
|
||||
|
||||
/* Done */
|
||||
return Status;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
HDA_FdoPnp(
|
||||
_In_ PDEVICE_OBJECT DeviceObject,
|
||||
|
|
|
@ -170,12 +170,3 @@ NTSTATUS
|
|||
HDA_PDOHandleQueryInterface(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
|
||||
/* hdaudbus.cpp*/
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HDA_SyncForwardIrp(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
|
||||
|
|
Loading…
Reference in a new issue