Prevent i8042prt to search for a keyboard/mouse more than once
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 30 Oct 2005 23:48:30 +0000 (23:48 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Sun, 30 Oct 2005 23:48:30 +0000 (23:48 +0000)
svn path=/trunk/; revision=18902

reactos/drivers/input/i8042prt/i8042prt.c

index 30cdbf2..208916d 100644 (file)
@@ -647,9 +647,15 @@ static NTSTATUS STDCALL I8042AddDevice(PDRIVER_OBJECT DriverObject,
        PDEVICE_EXTENSION DevExt;
        PFDO_DEVICE_EXTENSION FdoDevExt;
        PDEVICE_OBJECT Fdo;
+       static BOOLEAN AlreadyAdded = FALSE;
 
        DPRINT("I8042AddDevice\n");
 
+       /* HACK! */
+       if (AlreadyAdded)
+               return STATUS_UNSUCCESSFUL;
+       AlreadyAdded = TRUE;
+
        Status = IoCreateDevice(DriverObject,
                       sizeof(DEVICE_EXTENSION),
                       NULL,