hidclass.sys: Do not manually clean up devices on unload.
We can rely on ntoskrnl to do this for us. Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dece98fb59
commit
76daa6b70c
|
@ -109,7 +109,6 @@ NTSTATUS WINAPI HID_PNP_Dispatch(DEVICE_OBJECT *device, IRP *irp) DECLSPEC_HIDDE
|
|||
|
||||
/* Pseudo-Plug and Play support*/
|
||||
NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT* PDO) DECLSPEC_HIDDEN;
|
||||
NTSTATUS PNP_RemoveDevice(minidriver *minidriver, DEVICE_OBJECT* device, IRP* irp) DECLSPEC_HIDDEN;
|
||||
|
||||
/* Parsing HID Report Descriptors into preparsed data */
|
||||
WINE_HIDP_PREPARSED_DATA* ParseDescriptor(BYTE *descriptor, unsigned int length) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -48,12 +48,6 @@ static VOID WINAPI UnloadDriver(DRIVER_OBJECT *driver)
|
|||
md = find_minidriver(driver);
|
||||
if (md)
|
||||
{
|
||||
hid_device *device, *next;
|
||||
TRACE("%i devices to unload\n", list_count(&md->device_list));
|
||||
LIST_FOR_EACH_ENTRY_SAFE(device, next, &md->device_list, hid_device, entry)
|
||||
{
|
||||
PNP_RemoveDevice(md, device->device, NULL);
|
||||
}
|
||||
if (md->DriverUnload)
|
||||
md->DriverUnload(md->minidriver.DriverObject);
|
||||
list_remove(&md->entry);
|
||||
|
|
|
@ -205,7 +205,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS PNP_RemoveDevice(minidriver *minidriver, DEVICE_OBJECT *device, IRP *irp)
|
||||
static NTSTATUS remove_device(minidriver *minidriver, DEVICE_OBJECT *device, IRP *irp)
|
||||
{
|
||||
BASE_DEVICE_EXTENSION *ext = device->DeviceExtension;
|
||||
hid_device *hiddev;
|
||||
|
@ -306,7 +306,7 @@ NTSTATUS WINAPI HID_PNP_Dispatch(DEVICE_OBJECT *device, IRP *irp)
|
|||
}
|
||||
case IRP_MN_REMOVE_DEVICE:
|
||||
{
|
||||
return PNP_RemoveDevice(minidriver, device, irp);
|
||||
return remove_device(minidriver, device, irp);
|
||||
}
|
||||
default:
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue