Fix little bug which prevented IRP_MJ_PNP to be forwarded to lower driver
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 18 Dec 2005 20:50:26 +0000 (20:50 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Sun, 18 Dec 2005 20:50:26 +0000 (20:50 +0000)
Set eol-style to native for usbstor driver files

svn path=/trunk/; revision=20256

reactos/drivers/bus/serenum/serenum.c
reactos/drivers/dd/serial/serial.c
reactos/drivers/input/kbdclass/kbdclass.c
reactos/drivers/input/mouclass/mouclass.c
reactos/drivers/input/sermouse/sermouse.c
reactos/drivers/storage/pciidex/miniport.c
reactos/drivers/usb/miniport/common/main.c
reactos/drivers/usb/usbhub/usbhub.c
reactos/drivers/usb/usbstor/usbstor.c

index 54f4771..b6ee195 100644 (file)
@@ -100,7 +100,7 @@ DriverEntry(
        DriverObject->DriverUnload = DriverUnload;
        DriverObject->DriverExtension->AddDevice = SerenumAddDevice;
 
-       for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+       for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
                DriverObject->MajorFunction[i] = IrpStub;
 
        //DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = SerialQueryInformation;
index 90573e3..c8d2d5a 100644 (file)
@@ -29,7 +29,7 @@ DriverEntry(
        DriverObject->DriverUnload = DriverUnload;
        DriverObject->DriverExtension->AddDevice = SerialAddDevice;
 
-       for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+       for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
                DriverObject->MajorFunction[i] = ForwardIrpAndForget;
        DriverObject->MajorFunction[IRP_MJ_CREATE] = SerialCreate;
        DriverObject->MajorFunction[IRP_MJ_CLOSE] = SerialClose;
index 371b8ca..cbdb404 100644 (file)
@@ -798,7 +798,7 @@ DriverEntry(
        DriverObject->DriverExtension->AddDevice = ClassAddDevice;
        DriverObject->DriverUnload = DriverUnload;
 
-       for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+       for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
                DriverObject->MajorFunction[i] = IrpStub;
 
        DriverObject->MajorFunction[IRP_MJ_CREATE]         = ClassCreate;
index 48f91d5..5d6e9cb 100644 (file)
@@ -136,6 +136,7 @@ IrpStub(
                /* Forward some IRPs to lower device */
                switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction)
                {
+                       case IRP_MJ_PNP:
                        case IRP_MJ_INTERNAL_DEVICE_CONTROL:
                                return ForwardIrpAndForget(DeviceObject, Irp);
                        default:
@@ -788,7 +789,7 @@ DriverEntry(
        DriverObject->DriverExtension->AddDevice = ClassAddDevice;
        DriverObject->DriverUnload = DriverUnload;
 
-       for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+       for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
                DriverObject->MajorFunction[i] = IrpStub;
 
        DriverObject->MajorFunction[IRP_MJ_CREATE]         = ClassCreate;
index 13238c4..9bd461c 100644 (file)
@@ -150,7 +150,7 @@ DriverEntry(
        DriverObject->DriverUnload = DriverUnload;
        DriverObject->DriverExtension->AddDevice = SermouseAddDevice;
 
-       for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+       for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
                DriverObject->MajorFunction[i] = IrpStub;
 
        DriverObject->MajorFunction[IRP_MJ_CREATE] = SermouseCreate;
index bf6f2e9..e43ffc2 100644 (file)
@@ -50,7 +50,7 @@ PciIdeXInitialize(
 
        DriverObject->DriverExtension->AddDevice = PciIdeXAddDevice;
 
-       for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+       for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
                DriverObject->MajorFunction[i] = ForwardIrpAndForget;
        DriverObject->MajorFunction[IRP_MJ_PNP] = PciIdeXPnpDispatch;
 
index 6e30dfd..5f7cc83 100644 (file)
@@ -401,7 +401,7 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
        DriverObject->DriverUnload = DriverUnload;
        DriverObject->DriverExtension->AddDevice = AddDevice;
 
-       for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+       for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
                DriverObject->MajorFunction[i] = IrpStub;
 
        DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreate;
index e7aacf0..826162d 100644 (file)
@@ -179,7 +179,7 @@ DriverEntry(
        
        DriverObject->DriverExtension->AddDevice = UsbhubAddDevice;
        
-       for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+       for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
                DriverObject->MajorFunction[i] = IrpStub;
        
        DriverObject->MajorFunction[IRP_MJ_CREATE] = UsbhubCreate;
index 75ca46f..a49509f 100644 (file)
@@ -130,7 +130,7 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
        DriverObject->DriverUnload = DriverUnload;
        DriverObject->DriverExtension->AddDevice = AddDevice;
 
-       for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
+       for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
                DriverObject->MajorFunction[i] = IrpStub;
 
         DriverObject->DriverStartIo = (PVOID)StartIo;