From 85b27205262f2045e711bd1970788402f155e5a9 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 31 Jul 2011 17:18:50 +0000 Subject: [PATCH] [SERIAL] - Update the I/O manager's global configuration table with the correct number of serial ports svn path=/trunk/; revision=53005 --- reactos/drivers/serial/serial/pnp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/reactos/drivers/serial/serial/pnp.c b/reactos/drivers/serial/serial/pnp.c index 8578c22da98..8ecabdc3cbd 100644 --- a/reactos/drivers/serial/serial/pnp.c +++ b/reactos/drivers/serial/serial/pnp.c @@ -24,8 +24,6 @@ SerialAddDeviceInternal( NTSTATUS Status; WCHAR DeviceNameBuffer[32]; UNICODE_STRING DeviceName; - static ULONG DeviceNumber = 0; - static ULONG ComPortNumber = 1; TRACE_(SERIAL, "SerialAddDeviceInternal()\n"); @@ -33,7 +31,7 @@ SerialAddDeviceInternal( ASSERT(Pdo); /* Create new device object */ - swprintf(DeviceNameBuffer, L"\\Device\\Serial%lu", DeviceNumber); + swprintf(DeviceNameBuffer, L"\\Device\\Serial%lu", IoGetConfigurationInformation()->SerialCount); RtlInitUnicodeString(&DeviceName, DeviceNameBuffer); Status = IoCreateDevice(DriverObject, sizeof(SERIAL_DEVICE_EXTENSION), @@ -59,9 +57,9 @@ SerialAddDeviceInternal( goto ByeBye; } - DeviceExtension->SerialPortNumber = DeviceNumber++; + DeviceExtension->SerialPortNumber = IoGetConfigurationInformation()->SerialCount++; if (pComPortNumber == NULL) - DeviceExtension->ComPort = ComPortNumber++; + DeviceExtension->ComPort = DeviceExtension->SerialPortNumber + 1; else DeviceExtension->ComPort = *pComPortNumber; DeviceExtension->Pdo = Pdo;