Add .keep guard files in order to restore lost but empty directories we had with...
[reactos.git] / drivers / usb / usbehci / usbehci.c
index 0f35a31..d4e85be 100644 (file)
@@ -4,33 +4,12 @@
  * FILE:        drivers/usb/usbehci/usbehci.c
  * PURPOSE:     USB EHCI device driver.
  * PROGRAMMERS:
- *              Michael Martin
+ *              Michael Martin (michael.martin@reactos.org)
  */
 
 /* DEFINES *******************************************************************/
 #include "usbehci.h"
 
-static NTSTATUS NTAPI
-IrpStub(PDEVICE_OBJECT DeviceObject, PIRP Irp)
-{
-    NTSTATUS Status;
-
-    if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFdo)
-    {
-        DPRINT1("ehci: FDO stub for major function 0x%lx\n",
-            IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
-        return ForwardIrpAndForget(DeviceObject, Irp);
-    }
-
-    /* We are lower driver, So complete */
-    DPRINT1("ehci: PDO stub for major function 0x%lx\n",
-    IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
-
-    Status = Irp->IoStatus.Status;
-    IoCompleteRequest(Irp, IO_NO_INCREMENT);
-    return Status;
-}
-
 NTSTATUS NTAPI
 DispatchDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
 {
@@ -47,7 +26,9 @@ DispatchInternalDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
 {
     DPRINT("DispatchInternalDeviceControl\n");
     if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFdo)
-        return IrpStub(DeviceObject, Irp);
+    {
+        return FdoDispatchInternalDeviceControl(DeviceObject, Irp);
+    }
     else
         return PdoDispatchInternalDeviceControl(DeviceObject, Irp);
 }
@@ -88,7 +69,7 @@ UsbEhciClose(PDEVICE_OBJECT DeviceObject, PIRP Irp)
 VOID NTAPI
 DriverUnload(PDRIVER_OBJECT DriverObject)
 {
-    DPRINT1("Unloading Driver\n");
+    DPRINT("Unloading Driver\n");
     /* FIXME: Clean up */
 }
 
@@ -107,14 +88,13 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
     DPRINT1("Driver Entry %wZ!\n", RegistryPath);
 
     DriverObject->DriverExtension->AddDevice = AddDevice;
-
     DriverObject->MajorFunction[IRP_MJ_CREATE] = UsbEhciCreate;
     DriverObject->MajorFunction[IRP_MJ_CLOSE] = UsbEhciClose;
     DriverObject->MajorFunction[IRP_MJ_CLEANUP] = UsbEhciCleanup;
     DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchDeviceControl;
     DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = DispatchInternalDeviceControl;
     DriverObject->MajorFunction[IRP_MJ_PNP] = DispatchPnp;
-
+    
     DriverObject->DriverUnload = DriverUnload;
     DPRINT1("Driver entry done\n");