Move the initialization of USB keyboard and mouse to DriverEntry, to prevent some (not all!) race conditions with the loading of kbd/mouclass.

It is still not satisfying (they are not real USB drivers), but that's better...

svn path=/trunk/; revision=19172
This commit is contained in:
Hervé Poussineau 2005-11-12 09:27:52 +00:00
parent df6851867e
commit 21f6f8853b

View file

@ -280,11 +280,6 @@ AddDevice(
Status = IoCreateSymbolicLink(&LinkDeviceName, &DeviceName);
if (NT_SUCCESS(Status))
Status = AddDevice_Keyboard(DriverObject, pdo);
if (NT_SUCCESS(Status))
Status = AddDevice_Mouse(DriverObject, pdo);
if (!NT_SUCCESS(Status))
{
DPRINT("USBMP: IoCreateSymbolicLink() call failed with status 0x%08x\n", Status);
@ -428,5 +423,8 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
RegisterPortDriver(DriverObject, &UsbPortInterface);
AddDevice_Keyboard(DriverObject, NULL);
AddDevice_Mouse(DriverObject, NULL);
return STATUS_SUCCESS;
}