[SERENUM]
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 3 Feb 2014 00:13:57 +0000 (00:13 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 3 Feb 2014 00:13:57 +0000 (00:13 +0000)
* Do not include debug.h into the main header.
* Improve the GUIDs situation.
* Improve header inclusions.
CORE-7716

svn path=/trunk/; revision=61940

reactos/drivers/serial/serenum/CMakeLists.txt
reactos/drivers/serial/serenum/detect.c
reactos/drivers/serial/serenum/fdo.c
reactos/drivers/serial/serenum/guid.c [new file with mode: 0644]
reactos/drivers/serial/serenum/misc.c
reactos/drivers/serial/serenum/pdo.c
reactos/drivers/serial/serenum/serenum.c
reactos/drivers/serial/serenum/serenum.h

index 770a652..8fd1912 100644 (file)
@@ -5,6 +5,7 @@ add_library(serenum SHARED
     misc.c
     pdo.c
     serenum.c
+    guid.c
     serenum.rc)
 
 add_pch(serenum serenum.h)
index 8391ddb..293bee5 100644 (file)
@@ -11,6 +11,8 @@
 
 #include "serenum.h"
 
+#include <debug.h>
+
 static NTSTATUS
 DeviceIoControl(
        IN PDEVICE_OBJECT DeviceObject,
index d9052fa..d07682b 100644 (file)
@@ -9,6 +9,8 @@
 
 #include "serenum.h"
 
+#include <debug.h>
+
 NTSTATUS NTAPI
 SerenumAddDevice(
        IN PDRIVER_OBJECT DriverObject,
diff --git a/reactos/drivers/serial/serenum/guid.c b/reactos/drivers/serial/serenum/guid.c
new file mode 100644 (file)
index 0000000..4fa09ff
--- /dev/null
@@ -0,0 +1,7 @@
+/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
+
+#include <ntdef.h>
+#include <initguid.h>
+#include <ntddser.h>
+
+/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
index 033bd8b..9758f23 100644 (file)
@@ -9,6 +9,8 @@
 
 #include "serenum.h"
 
+#include <debug.h>
+
 static IO_COMPLETION_ROUTINE ForwardIrpAndWaitCompletion;
 
 /* I really want PCSZ strings as last arguments because
index 2dcffab..039762c 100644 (file)
@@ -9,6 +9,8 @@
 
 #include "serenum.h"
 
+#include <debug.h>
+
 static NTSTATUS
 SerenumPdoStartDevice(
        IN PDEVICE_OBJECT DeviceObject)
index 8dc0e3d..796e925 100644 (file)
@@ -7,9 +7,10 @@
  * PROGRAMMERS:     HervĂ© Poussineau (hpoussin@reactos.org)
  */
 
-#define INITGUID
 #include "serenum.h"
 
+#include <debug.h>
+
 static DRIVER_DISPATCH SerenumPnp;
 static DRIVER_DISPATCH IrpStub;
 static DRIVER_UNLOAD DriverUnload;
index 0601b44..2383760 100644 (file)
@@ -8,11 +8,7 @@
  */
 
 #include <ntifs.h>
-#include <ntddk.h>
 #include <ntddser.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <debug.h>
 
 typedef enum
 {