sync with trunk r46493
[reactos.git] / drivers / serial / serenum / detect.c
index fcf2a65..8391ddb 100644 (file)
@@ -467,7 +467,7 @@ SerenumDetectLegacyDevice(
        /* Open port */
        Status = ObOpenObjectByPointer(
                LowerDevice,
-               OBJ_EXCLUSIVE | OBJ_KERNEL_HANDLE,
+               OBJ_KERNEL_HANDLE,
                NULL,
                0,
                NULL,
@@ -532,7 +532,7 @@ SerenumDetectLegacyDevice(
 
        /* Fill the read buffer */
        TRACE_(SERENUM, "Fill the read buffer\n");
-       Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), &Count);
+       Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), (PVOID)&Count);
        if (!NT_SUCCESS(Status)) goto ByeBye;
 
        RtlInitUnicodeString(&DeviceId, L"Serenum\\Mouse");
@@ -572,6 +572,7 @@ SerenumDetectLegacyDevice(
                                        RtlInitUnicodeString(&DeviceDescription, L"Microsoft Mouse with 3-buttons");
                                        SerenumInitMultiSzString(&HardwareIds, "*PNP0F08", NULL);
                                        SerenumInitMultiSzString(&CompatibleIds, "SERIAL_MOUSE", NULL);
+                                       break;
                                default:
                                        /* Hardware id: *PNP0F01
                                         * Compatible id: SERIAL_MOUSE
@@ -579,6 +580,7 @@ SerenumDetectLegacyDevice(
                                        RtlInitUnicodeString(&DeviceDescription, L"Microsoft Mouse with 2-buttons or Microsoft Wheel Mouse");
                                        SerenumInitMultiSzString(&HardwareIds, "*PNP0F01", NULL);
                                        SerenumInitMultiSzString(&CompatibleIds, "SERIAL_MOUSE", NULL);
+                                       break;
                        }
                        Status = ReportDetectedDevice(DeviceObject,
                                &DeviceDescription, &DeviceId, &InstanceId, &HardwareIds, &CompatibleIds);