Remove unneeded hack. DriverEntry is now called only once.

svn path=/trunk/; revision=14597
This commit is contained in:
Hervé Poussineau 2005-04-11 22:38:53 +00:00
parent 63e93fb6ba
commit 95cdf6e471

View file

@ -26,7 +26,6 @@ DriverEntry(
IN PUNICODE_STRING RegPath)
{
ULONG i;
static BOOLEAN FirstTime = TRUE;
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = SerialAddDevice;
@ -43,16 +42,5 @@ DriverEntry(
DriverObject->MajorFunction[IRP_MJ_PNP] = SerialPnp;
DriverObject->MajorFunction[IRP_MJ_POWER] = SerialPower;
/* FIXME: It seems that DriverEntry function may be called more
* than once. Do only legacy detection the first time. */
if (FirstTime)
{
FirstTime = FALSE;
return DetectLegacyDevices(DriverObject);
}
else
{
DPRINT1("Serial: DriverEntry called for the second time!\n");
return STATUS_SUCCESS;
}
}