mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[NTOS:PNP]
- Fix indentation in PnpRootPdoPnpControl. Also avoid unnecessary casts. No functional changes. svn path=/trunk/; revision=71083
This commit is contained in:
parent
72cf18964b
commit
d4705d3a33
1 changed files with 60 additions and 60 deletions
|
@ -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;
|
||||
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);
|
||||
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;
|
||||
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_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_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_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_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_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_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);
|
||||
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 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)
|
||||
/* 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");
|
||||
|
|
Loading…
Reference in a new issue