mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-24 00:46:23 +00:00
wineusb.sys: Move the event threads to IRP_MN_START_DEVICE.
To correspond with the shutdown in IRP_MN_REMOVE_DEVICE.
This commit is contained in:
parent
92ae93d752
commit
0427ccb141
|
@ -487,6 +487,9 @@ static NTSTATUS fdo_pnp(IRP *irp)
|
|||
}
|
||||
|
||||
case IRP_MN_START_DEVICE:
|
||||
libusb_event_thread = CreateThread(NULL, 0, libusb_event_thread_proc, NULL, 0, NULL);
|
||||
event_thread = CreateThread(NULL, 0, event_thread_proc, NULL, 0, NULL);
|
||||
|
||||
if ((ret = libusb_hotplug_register_callback(NULL,
|
||||
LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED | LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT,
|
||||
LIBUSB_HOTPLUG_ENUMERATE, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY,
|
||||
|
@ -1154,9 +1157,6 @@ NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, UNICODE_STRING *path)
|
|||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
libusb_event_thread = CreateThread(NULL, 0, libusb_event_thread_proc, NULL, 0, NULL);
|
||||
event_thread = CreateThread(NULL, 0, event_thread_proc, NULL, 0, NULL);
|
||||
|
||||
driver->DriverExtension->AddDevice = driver_add_device;
|
||||
driver->DriverUnload = driver_unload;
|
||||
driver->MajorFunction[IRP_MJ_PNP] = driver_pnp;
|
||||
|
|
Loading…
Reference in a new issue