Author: cgutman Date: Wed Jun 9 20:12:27 2010 New Revision: 47723
URL: http://svn.reactos.org/svn/reactos?rev=47723&view=rev Log: [PCI] - Implement IRP_MN_REMOVE_DEVICE handling for FDOs
Modified: trunk/reactos/drivers/bus/pci/fdo.c
Modified: trunk/reactos/drivers/bus/pci/fdo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pci/fdo.c?rev=4... ============================================================================== --- trunk/reactos/drivers/bus/pci/fdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pci/fdo.c [iso-8859-1] Wed Jun 9 20:12:27 2010 @@ -551,10 +551,6 @@ case IRP_MN_QUERY_STOP_DEVICE: Status = STATUS_NOT_IMPLEMENTED; break; - - case IRP_MN_REMOVE_DEVICE: - Status = STATUS_NOT_IMPLEMENTED; - break; #endif case IRP_MN_START_DEVICE: DPRINT("IRP_MN_START_DEVICE received\n"); @@ -579,7 +575,14 @@ case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: break; case IRP_MN_REMOVE_DEVICE: - DPRINT1("IRP_MN_REMOVE_DEVICE is UNIMPLEMENTED!\n"); + /* Detach the device object from the device stack */ + IoDetachDevice(DeviceExtension->Ldo); + + /* Delete the device object */ + IoDeleteDevice(DeviceObject); + + /* Return success */ + Status = STATUS_SUCCESS; break; default: DPRINT1("Unknown IOCTL 0x%lx\n", IrpSp->MinorFunction);