[PATCH driver/ast 11/15] Include local headers only when needed

Egbert Eich eich at freedesktop.org
Thu Apr 24 10:36:59 PDT 2014


From: Egbert Eich <eich at suse.de>

Move inclusion of local headers from ast.h to the individual
files. Include only those headers which are needed.

Signed-off-by: Egbert Eich <eich at suse.de>
---
 src/ast.h         | 5 -----
 src/ast_2dtool.c  | 2 ++
 src/ast_accel.c   | 1 +
 src/ast_cursor.c  | 2 ++
 src/ast_driver.c  | 3 +++
 src/ast_mode.c    | 2 ++
 src/ast_vgatool.c | 1 +
 7 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/ast.h b/src/ast.h
index 953f257..6001b63 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -357,8 +357,3 @@ Bool ASTUnmapMem(ScrnInfoPtr pScrn);
 Bool ASTMapMMIO(ScrnInfoPtr pScrn);
 void ASTUnmapMMIO(ScrnInfoPtr pScrn);
 
-/* Include Files */
-#include "ast_mode.h"
-#include "ast_vgatool.h"
-#include "ast_2dtool.h"
-#include "ast_cursor.h"
diff --git a/src/ast_2dtool.c b/src/ast_2dtool.c
index 3cf83fe..b4f0a4a 100644
--- a/src/ast_2dtool.c
+++ b/src/ast_2dtool.c
@@ -48,6 +48,8 @@
 
 /* Driver specific headers */
 #include "ast.h"
+#include "ast_vgatool.h"
+#include "ast_2dtool.h"
 
 #ifdef	Accel_2D
 typedef Bool (*PFN_bENABLE_CMDQ)(ScrnInfoPtr , ASTRecPtr);
diff --git a/src/ast_accel.c b/src/ast_accel.c
index 1217b01..fd91688 100644
--- a/src/ast_accel.c
+++ b/src/ast_accel.c
@@ -52,6 +52,7 @@
 
 /* Driver specific headers */
 #include "ast.h"
+#include "ast_2dtool.h"
 
 #ifdef	Accel_2D
 
diff --git a/src/ast_cursor.c b/src/ast_cursor.c
index 4598daa..5031aac 100644
--- a/src/ast_cursor.c
+++ b/src/ast_cursor.c
@@ -50,6 +50,8 @@
 
 /* Driver specific headers */
 #include "ast.h"
+#include "ast_vgatool.h"
+#include "ast_cursor.h"
 
 #ifdef	HWC
 /* Prototype type declaration */
diff --git a/src/ast_driver.c b/src/ast_driver.c
index 863e590..b6accbf 100644
--- a/src/ast_driver.c
+++ b/src/ast_driver.c
@@ -56,6 +56,9 @@
 
 /* Driver specific headers */
 #include "ast.h"
+#include "ast_mode.h"
+#include "ast_vgatool.h"
+#include "ast_2dtool.h"
 
 /* Mandatory functions */
 static void ASTIdentify(int flags);
diff --git a/src/ast_mode.c b/src/ast_mode.c
index ceb2ddb..59488c4 100644
--- a/src/ast_mode.c
+++ b/src/ast_mode.c
@@ -52,6 +52,8 @@
 
 /* Driver specific headers */
 #include "ast.h"
+#include "ast_mode.h"
+#include "ast_vgatool.h"
 
 static VBIOS_STDTABLE_STRUCT StdTable[] = {
     /* MD_2_3_400 */
diff --git a/src/ast_vgatool.c b/src/ast_vgatool.c
index b42ac7a..9a96ac5 100644
--- a/src/ast_vgatool.c
+++ b/src/ast_vgatool.c
@@ -52,6 +52,7 @@
 
 /* Driver specific headers */
 #include "ast.h"
+#include "ast_vgatool.h"
 
 
 __inline ULONG MIndwm(UCHAR *mmiobase, ULONG r)
-- 
1.8.4.5



More information about the xorg-devel mailing list