Author: tfaber
Date: Sun May 12 18:51:11 2013
New Revision: 59011
URL:
http://svn.reactos.org/svn/reactos?rev=59011&view=rev
Log:
[HID]
- Hidclass must delete the FDO, not the minidriver.
Modified:
trunk/reactos/drivers/hid/hidclass/fdo.c
trunk/reactos/drivers/hid/hidusb/hidusb.c
Modified: trunk/reactos/drivers/hid/hidclass/fdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidclass/fdo.c…
==============================================================================
--- trunk/reactos/drivers/hid/hidclass/fdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/hid/hidclass/fdo.c [iso-8859-1] Sun May 12 18:51:11 2013
@@ -411,6 +411,13 @@
IN PIRP Irp)
{
NTSTATUS Status;
+ PHIDCLASS_FDO_EXTENSION FDODeviceExtension;
+
+ //
+ // get device extension
+ //
+ FDODeviceExtension = DeviceObject->DeviceExtension;
+ ASSERT(FDODeviceExtension->Common.IsFDO);
/* FIXME cleanup */
@@ -425,6 +432,13 @@
//
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
+
+ //
+ // detach and delete device
+ //
+ IoDetachDevice(FDODeviceExtension->Common.HidDeviceExtension.NextDeviceObject);
+ IoDeleteDevice(DeviceObject);
+
return Status;
}
Modified: trunk/reactos/drivers/hid/hidusb/hidusb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidusb/hidusb.…
==============================================================================
--- trunk/reactos/drivers/hid/hidusb/hidusb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/hid/hidusb/hidusb.c [iso-8859-1] Sun May 12 18:51:11 2013
@@ -1660,12 +1660,6 @@
HidDeviceExtension->ConfigurationDescriptor = NULL;
}
- //
- // delete and detach device
- //
- IoDetachDevice(DeviceExtension->NextDeviceObject);
- IoDeleteDevice(DeviceObject);
-
return Status;
}
case IRP_MN_QUERY_PNP_DEVICE_STATE: