[DRIVERS] Use IoForwardIrpSynchronously in drivers
[reactos.git] / drivers / usb / usbstor / misc.c
index 040ca56..71af4c1 100644 (file)
@@ -29,29 +29,6 @@ USBSTOR_SyncForwardIrpCompletionRoutine(
     return STATUS_MORE_PROCESSING_REQUIRED;
 }
 
-NTSTATUS
-NTAPI
-USBSTOR_SyncForwardIrp(PDEVICE_OBJECT DeviceObject, PIRP Irp)
-{
-    KEVENT Event;
-    NTSTATUS Status;
-
-    KeInitializeEvent(&Event, NotificationEvent, FALSE);
-    IoCopyCurrentIrpStackLocationToNext(Irp);
-    IoSetCompletionRoutine(Irp, USBSTOR_SyncForwardIrpCompletionRoutine, &Event, TRUE, TRUE, TRUE);
-
-    Status = IoCallDriver(DeviceObject, Irp);
-
-    if (Status == STATUS_PENDING)
-    {
-        // wait for the request to finish
-        KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
-        Status = Irp->IoStatus.Status;
-    }
-
-    return Status;
-}
-
 NTSTATUS
 NTAPI
 USBSTOR_GetBusInterface(