[PATCH driver/ast 10/15] Clean up namespace in ast_tool.c

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


From: Egbert Eich <eich at suse.de>

- Made sure exported functions have 'AST' in their name.
  This avoids name space conflicts with the server or other drivers.
- Placed declaration of exported functions in a header file.
  This ensures that changes to the function type or arguments are followed
  thru everywhere.

Signed-off-by: Egbert Eich <eich at suse.de>
---
 src/ast.h        | 5 +++++
 src/ast_driver.c | 6 ------
 src/ast_tool.c   | 6 ------
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/ast.h b/src/ast.h
index a50f182..953f257 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -351,6 +351,11 @@ Bool ASTAccelInit(ScreenPtr pScreen);
 #endif
 void ASTDisplayVideo(ScrnInfoPtr pScrn, ASTPortPrivPtr pPriv, RegionPtr clipBoxes, int id);
 
+/* ast_tool.c */
+Bool ASTMapMem(ScrnInfoPtr pScrn);
+Bool ASTUnmapMem(ScrnInfoPtr pScrn);
+Bool ASTMapMMIO(ScrnInfoPtr pScrn);
+void ASTUnmapMMIO(ScrnInfoPtr pScrn);
 
 /* Include Files */
 #include "ast_mode.h"
diff --git a/src/ast_driver.c b/src/ast_driver.c
index 3d3f01a..863e590 100644
--- a/src/ast_driver.c
+++ b/src/ast_driver.c
@@ -57,12 +57,6 @@
 /* Driver specific headers */
 #include "ast.h"
 
-/* external reference fucntion */
-extern Bool ASTMapMem(ScrnInfoPtr pScrn);
-extern Bool ASTUnmapMem(ScrnInfoPtr pScrn);
-extern Bool ASTMapMMIO(ScrnInfoPtr pScrn);
-extern void ASTUnmapMMIO(ScrnInfoPtr pScrn);
-
 /* Mandatory functions */
 static void ASTIdentify(int flags);
 const OptionInfoRec *ASTAvailableOptions(int chipid, int busid);
diff --git a/src/ast_tool.c b/src/ast_tool.c
index 1e1cb6b..9ab28cb 100644
--- a/src/ast_tool.c
+++ b/src/ast_tool.c
@@ -50,12 +50,6 @@
 /* Driver specific headers */
 #include "ast.h"
 
-/* Prototype type declaration*/
-Bool ASTMapMem(ScrnInfoPtr pScrn);
-Bool ASTUnmapMem(ScrnInfoPtr pScrn);
-Bool ASTMapMMIO(ScrnInfoPtr pScrn);
-void ASTUnmapMMIO(ScrnInfoPtr pScrn);
-
 Bool
 ASTMapMem(ScrnInfoPtr pScrn)
 {
-- 
1.8.4.5



More information about the xorg-devel mailing list