[ros-diffs] [hpoussin] 14597: Remove unneeded hack. DriverEntry is now called only once.

hpoussin at svn.reactos.com hpoussin at svn.reactos.com
Tue Apr 12 00:38:55 CEST 2005


Remove unneeded hack. DriverEntry is now called only once.
Modified: trunk/reactos/drivers/dd/serial/serial.c
  _____  

Modified: trunk/reactos/drivers/dd/serial/serial.c
--- trunk/reactos/drivers/dd/serial/serial.c	2005-04-11 22:38:05 UTC
(rev 14596)
+++ trunk/reactos/drivers/dd/serial/serial.c	2005-04-11 22:38:53 UTC
(rev 14597)
@@ -26,7 +26,6 @@

 	IN PUNICODE_STRING RegPath)
 {
 	ULONG i;
-	static BOOLEAN FirstTime = TRUE;
 	
 	DriverObject->DriverUnload = DriverUnload;
 	DriverObject->DriverExtension->AddDevice = SerialAddDevice;
@@ -43,16 +42,5 @@
 	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;
-	}
+	return DetectLegacyDevices(DriverObject);
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050412/aae2720c/attachment.html


More information about the Ros-diffs mailing list