[NTOS:PNP]
authorThomas Faber <thomas.faber@reactos.org>
Thu, 31 Mar 2016 07:54:52 +0000 (07:54 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Thu, 31 Mar 2016 07:54:52 +0000 (07:54 +0000)
- Fix indentation in PnpRootPdoPnpControl. Also avoid unnecessary casts. No functional changes.

svn path=/trunk/; revision=71083

reactos/ntoskrnl/io/pnpmgr/pnproot.c

index 93746fd..a94184d 100644 (file)
@@ -1110,84 +1110,84 @@ PnpRootPdoPnpControl(
   IN PDEVICE_OBJECT DeviceObject,
   IN PIRP Irp)
 {
-  PPNPROOT_PDO_DEVICE_EXTENSION DeviceExtension;
-  PPNPROOT_FDO_DEVICE_EXTENSION FdoDeviceExtension;
-  PIO_STACK_LOCATION IrpSp;
-  NTSTATUS Status;
-
-  DeviceExtension = (PPNPROOT_PDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
-  FdoDeviceExtension = (PPNPROOT_FDO_DEVICE_EXTENSION)PnpRootDeviceObject->DeviceExtension;
-  Status = Irp->IoStatus.Status;
-  IrpSp = IoGetCurrentIrpStackLocation(Irp);
-
-  switch (IrpSp->MinorFunction)
-  {
-    case IRP_MN_START_DEVICE: /* 0x00 */
-      DPRINT("IRP_MJ_PNP / IRP_MN_START_DEVICE\n");
-      Status = STATUS_SUCCESS;
-      break;
-
-    case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x07 */
-      Status = PdoQueryDeviceRelations(DeviceObject, Irp, IrpSp);
-      break;
-
-    case IRP_MN_QUERY_CAPABILITIES: /* 0x09 */
-      DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_CAPABILITIES\n");
-      Status = PdoQueryCapabilities(DeviceObject, Irp, IrpSp);
-      break;
-
-    case IRP_MN_QUERY_RESOURCES: /* 0x0a */
-      DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n");
-      Status = PdoQueryResources(DeviceObject, Irp, IrpSp);
-      break;
-
-   case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: /* 0x0b */
-      DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
-      Status = PdoQueryResourceRequirements(DeviceObject, Irp, IrpSp);
-      break;
-
-    case IRP_MN_QUERY_DEVICE_TEXT: /* 0x0c */
-      DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
-      Status = PdoQueryDeviceText(DeviceObject, Irp, IrpSp);
-      break;
-
-    case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* 0x0d */
-        DPRINT("IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
-        break;
-
-    case IRP_MN_REMOVE_DEVICE:
-        /* Remove the device from the device list and decrement the device count*/
-        KeAcquireGuardedMutex(&FdoDeviceExtension->DeviceListLock);
-        RemoveEntryList(&DeviceExtension->DeviceInfo->ListEntry);
-        FdoDeviceExtension->DeviceListCount--;
-        KeReleaseGuardedMutex(&FdoDeviceExtension->DeviceListLock);
-
-        /* Free some strings we created */
-        RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->DeviceDescription);
-        RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->DeviceID);
-        RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->InstanceID);
-
-        /* Free the resource requirements list */
-        if (DeviceExtension->DeviceInfo->ResourceRequirementsList != NULL)
+    PPNPROOT_PDO_DEVICE_EXTENSION DeviceExtension;
+    PPNPROOT_FDO_DEVICE_EXTENSION FdoDeviceExtension;
+    PIO_STACK_LOCATION IrpSp;
+    NTSTATUS Status;
+
+    DeviceExtension = DeviceObject->DeviceExtension;
+    FdoDeviceExtension = PnpRootDeviceObject->DeviceExtension;
+    Status = Irp->IoStatus.Status;
+    IrpSp = IoGetCurrentIrpStackLocation(Irp);
+
+    switch (IrpSp->MinorFunction)
+    {
+        case IRP_MN_START_DEVICE: /* 0x00 */
+            DPRINT("IRP_MJ_PNP / IRP_MN_START_DEVICE\n");
+            Status = STATUS_SUCCESS;
+            break;
+
+        case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x07 */
+            Status = PdoQueryDeviceRelations(DeviceObject, Irp, IrpSp);
+            break;
+
+        case IRP_MN_QUERY_CAPABILITIES: /* 0x09 */
+            DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_CAPABILITIES\n");
+            Status = PdoQueryCapabilities(DeviceObject, Irp, IrpSp);
+            break;
+
+        case IRP_MN_QUERY_RESOURCES: /* 0x0a */
+            DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n");
+            Status = PdoQueryResources(DeviceObject, Irp, IrpSp);
+            break;
+
+        case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: /* 0x0b */
+            DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
+            Status = PdoQueryResourceRequirements(DeviceObject, Irp, IrpSp);
+            break;
+
+        case IRP_MN_QUERY_DEVICE_TEXT: /* 0x0c */
+            DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
+            Status = PdoQueryDeviceText(DeviceObject, Irp, IrpSp);
+            break;
+
+        case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* 0x0d */
+            DPRINT("IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
+            break;
+
+        case IRP_MN_REMOVE_DEVICE:
+            /* Remove the device from the device list and decrement the device count*/
+            KeAcquireGuardedMutex(&FdoDeviceExtension->DeviceListLock);
+            RemoveEntryList(&DeviceExtension->DeviceInfo->ListEntry);
+            FdoDeviceExtension->DeviceListCount--;
+            KeReleaseGuardedMutex(&FdoDeviceExtension->DeviceListLock);
+
+            /* Free some strings we created */
+            RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->DeviceDescription);
+            RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->DeviceID);
+            RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->InstanceID);
+
+            /* Free the resource requirements list */
+            if (DeviceExtension->DeviceInfo->ResourceRequirementsList != NULL)
             ExFreePool(DeviceExtension->DeviceInfo->ResourceRequirementsList);
 
-        /* Free the boot resources list */
-        if (DeviceExtension->DeviceInfo->ResourceList != NULL)
+            /* Free the boot resources list */
+            if (DeviceExtension->DeviceInfo->ResourceList != NULL)
             ExFreePool(DeviceExtension->DeviceInfo->ResourceList);
 
-        /* Free the device info */
-        ExFreePool(DeviceExtension->DeviceInfo);
+            /* Free the device info */
+            ExFreePool(DeviceExtension->DeviceInfo);
 
-        /* Finally, delete the device object */
-        IoDeleteDevice(DeviceObject);
+            /* Finally, delete the device object */
+            IoDeleteDevice(DeviceObject);
 
-        /* Return success */
-        Status = STATUS_SUCCESS;
-        break;
+            /* Return success */
+            Status = STATUS_SUCCESS;
+            break;
 
-    case IRP_MN_QUERY_ID: /* 0x13 */
-      Status = PdoQueryId(DeviceObject, Irp, IrpSp);
-      break;
+        case IRP_MN_QUERY_ID: /* 0x13 */
+            Status = PdoQueryId(DeviceObject, Irp, IrpSp);
+            break;
 
         case IRP_MN_QUERY_BUS_INFORMATION: /* 0x15 */
             DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_BUS_INFORMATION\n");