mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:56:26 +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 PDEVICE_OBJECT DeviceObject,
|
||||||
IN PIRP Irp)
|
IN PIRP Irp)
|
||||||
{
|
{
|
||||||
PPNPROOT_PDO_DEVICE_EXTENSION DeviceExtension;
|
PPNPROOT_PDO_DEVICE_EXTENSION DeviceExtension;
|
||||||
PPNPROOT_FDO_DEVICE_EXTENSION FdoDeviceExtension;
|
PPNPROOT_FDO_DEVICE_EXTENSION FdoDeviceExtension;
|
||||||
PIO_STACK_LOCATION IrpSp;
|
PIO_STACK_LOCATION IrpSp;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DeviceExtension = (PPNPROOT_PDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
DeviceExtension = DeviceObject->DeviceExtension;
|
||||||
FdoDeviceExtension = (PPNPROOT_FDO_DEVICE_EXTENSION)PnpRootDeviceObject->DeviceExtension;
|
FdoDeviceExtension = PnpRootDeviceObject->DeviceExtension;
|
||||||
Status = Irp->IoStatus.Status;
|
Status = Irp->IoStatus.Status;
|
||||||
IrpSp = IoGetCurrentIrpStackLocation(Irp);
|
IrpSp = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
switch (IrpSp->MinorFunction)
|
switch (IrpSp->MinorFunction)
|
||||||
{
|
{
|
||||||
case IRP_MN_START_DEVICE: /* 0x00 */
|
case IRP_MN_START_DEVICE: /* 0x00 */
|
||||||
DPRINT("IRP_MJ_PNP / IRP_MN_START_DEVICE\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_START_DEVICE\n");
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x07 */
|
case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x07 */
|
||||||
Status = PdoQueryDeviceRelations(DeviceObject, Irp, IrpSp);
|
Status = PdoQueryDeviceRelations(DeviceObject, Irp, IrpSp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_CAPABILITIES: /* 0x09 */
|
case IRP_MN_QUERY_CAPABILITIES: /* 0x09 */
|
||||||
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_CAPABILITIES\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_CAPABILITIES\n");
|
||||||
Status = PdoQueryCapabilities(DeviceObject, Irp, IrpSp);
|
Status = PdoQueryCapabilities(DeviceObject, Irp, IrpSp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_RESOURCES: /* 0x0a */
|
case IRP_MN_QUERY_RESOURCES: /* 0x0a */
|
||||||
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n");
|
||||||
Status = PdoQueryResources(DeviceObject, Irp, IrpSp);
|
Status = PdoQueryResources(DeviceObject, Irp, IrpSp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: /* 0x0b */
|
case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: /* 0x0b */
|
||||||
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
|
||||||
Status = PdoQueryResourceRequirements(DeviceObject, Irp, IrpSp);
|
Status = PdoQueryResourceRequirements(DeviceObject, Irp, IrpSp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_DEVICE_TEXT: /* 0x0c */
|
case IRP_MN_QUERY_DEVICE_TEXT: /* 0x0c */
|
||||||
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
|
||||||
Status = PdoQueryDeviceText(DeviceObject, Irp, IrpSp);
|
Status = PdoQueryDeviceText(DeviceObject, Irp, IrpSp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* 0x0d */
|
case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* 0x0d */
|
||||||
DPRINT("IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_REMOVE_DEVICE:
|
case IRP_MN_REMOVE_DEVICE:
|
||||||
/* Remove the device from the device list and decrement the device count*/
|
/* Remove the device from the device list and decrement the device count*/
|
||||||
KeAcquireGuardedMutex(&FdoDeviceExtension->DeviceListLock);
|
KeAcquireGuardedMutex(&FdoDeviceExtension->DeviceListLock);
|
||||||
RemoveEntryList(&DeviceExtension->DeviceInfo->ListEntry);
|
RemoveEntryList(&DeviceExtension->DeviceInfo->ListEntry);
|
||||||
FdoDeviceExtension->DeviceListCount--;
|
FdoDeviceExtension->DeviceListCount--;
|
||||||
KeReleaseGuardedMutex(&FdoDeviceExtension->DeviceListLock);
|
KeReleaseGuardedMutex(&FdoDeviceExtension->DeviceListLock);
|
||||||
|
|
||||||
/* Free some strings we created */
|
/* Free some strings we created */
|
||||||
RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->DeviceDescription);
|
RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->DeviceDescription);
|
||||||
RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->DeviceID);
|
RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->DeviceID);
|
||||||
RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->InstanceID);
|
RtlFreeUnicodeString(&DeviceExtension->DeviceInfo->InstanceID);
|
||||||
|
|
||||||
/* Free the resource requirements list */
|
/* Free the resource requirements list */
|
||||||
if (DeviceExtension->DeviceInfo->ResourceRequirementsList != NULL)
|
if (DeviceExtension->DeviceInfo->ResourceRequirementsList != NULL)
|
||||||
ExFreePool(DeviceExtension->DeviceInfo->ResourceRequirementsList);
|
ExFreePool(DeviceExtension->DeviceInfo->ResourceRequirementsList);
|
||||||
|
|
||||||
/* Free the boot resources list */
|
/* Free the boot resources list */
|
||||||
if (DeviceExtension->DeviceInfo->ResourceList != NULL)
|
if (DeviceExtension->DeviceInfo->ResourceList != NULL)
|
||||||
ExFreePool(DeviceExtension->DeviceInfo->ResourceList);
|
ExFreePool(DeviceExtension->DeviceInfo->ResourceList);
|
||||||
|
|
||||||
/* Free the device info */
|
/* Free the device info */
|
||||||
ExFreePool(DeviceExtension->DeviceInfo);
|
ExFreePool(DeviceExtension->DeviceInfo);
|
||||||
|
|
||||||
/* Finally, delete the device object */
|
/* Finally, delete the device object */
|
||||||
IoDeleteDevice(DeviceObject);
|
IoDeleteDevice(DeviceObject);
|
||||||
|
|
||||||
/* Return success */
|
/* Return success */
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_ID: /* 0x13 */
|
case IRP_MN_QUERY_ID: /* 0x13 */
|
||||||
Status = PdoQueryId(DeviceObject, Irp, IrpSp);
|
Status = PdoQueryId(DeviceObject, Irp, IrpSp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_QUERY_BUS_INFORMATION: /* 0x15 */
|
case IRP_MN_QUERY_BUS_INFORMATION: /* 0x15 */
|
||||||
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_BUS_INFORMATION\n");
|
DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_BUS_INFORMATION\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue