Author: tfaber
Date: Thu Mar 31 07:54:52 2016
New Revision: 71083
URL:
http://svn.reactos.org/svn/reactos?rev=71083&view=rev
Log:
[NTOS:PNP]
- Fix indentation in PnpRootPdoPnpControl. Also avoid unnecessary casts. No functional
changes.
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnproot…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c [iso-8859-1] Thu Mar 31 07:54:52 2016
@@ -1110,84 +1110,84 @@
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);
-
- /* Finally, delete the device object */
- IoDeleteDevice(DeviceObject);
-
- /* Return success */
- Status = STATUS_SUCCESS;
- break;
-
- case IRP_MN_QUERY_ID: /* 0x13 */
- Status = PdoQueryId(DeviceObject, Irp, IrpSp);
- break;
+ /* Free the device info */
+ ExFreePool(DeviceExtension->DeviceInfo);
+
+ /* Finally, delete the device object */
+ IoDeleteDevice(DeviceObject);
+
+ /* Return success */
+ Status = STATUS_SUCCESS;
+ 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");