From 28f815fe8b56138f32a98e3712b61e930b5e892e Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Tue, 22 Apr 2014 13:47:39 +0200 Subject: Clean up namespace in ast_cursor.c - Make sure exported functions have 'AST' in their name. This avoids name space conflicts with the server or other drivers. - Place 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 Acked-by: Y.C. Chen --- src/ast.h | 7 +++++++ src/ast_cursor.c | 5 +---- src/ast_driver.c | 3 --- src/ast_mode.c | 5 +---- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/ast.h b/src/ast.h index 20df2e1..707149e 100644 --- a/src/ast.h +++ b/src/ast.h @@ -335,6 +335,13 @@ UCHAR *pASTjRequestCMDQ(ASTRecPtr pAST, ULONG ulDataLen); Bool bASTEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST); void vASTDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST); +/* ast_cursor.c */ +#ifdef HWC +Bool ASTCursorInit(ScreenPtr pScreen); +Bool bASTInitHWC(ScrnInfoPtr pScrn, ASTRecPtr pAST); +void ASTDisableHWC(ScrnInfoPtr pScrn); +#endif + /* Include Files */ #include "ast_mode.h" #include "ast_vgatool.h" diff --git a/src/ast_cursor.c b/src/ast_cursor.c index 7bfa15f..4598daa 100644 --- a/src/ast_cursor.c +++ b/src/ast_cursor.c @@ -53,9 +53,6 @@ #ifdef HWC /* Prototype type declaration */ -Bool ASTCursorInit(ScreenPtr pScreen); -Bool bInitHWC(ScrnInfoPtr pScrn, ASTRecPtr pAST); -void ASTDisableHWC(ScrnInfoPtr pScrn); static void ASTShowCursor(ScrnInfoPtr pScrn); static void ASTHideCursor(ScrnInfoPtr pScrn); static void ASTSetCursorPosition(ScrnInfoPtr pScrn, int x, int y); @@ -111,7 +108,7 @@ ASTCursorInit(ScreenPtr pScreen) } -Bool bInitHWC(ScrnInfoPtr pScrn, ASTRecPtr pAST) +Bool bASTInitHWC(ScrnInfoPtr pScrn, ASTRecPtr pAST) { ScreenPtr pScreen; diff --git a/src/ast_driver.c b/src/ast_driver.c index 5b02c9e..4fc8b28 100644 --- a/src/ast_driver.c +++ b/src/ast_driver.c @@ -69,9 +69,6 @@ extern Bool ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode); extern Bool ASTAccelInit(ScreenPtr pScreen); #endif -extern Bool ASTCursorInit(ScreenPtr pScreen); -extern void ASTDisableHWC(ScrnInfoPtr pScrn); - /* Mandatory functions */ static void ASTIdentify(int flags); const OptionInfoRec *ASTAvailableOptions(int chipid, int busid); diff --git a/src/ast_mode.c b/src/ast_mode.c index 3d06700..9e41bd4 100644 --- a/src/ast_mode.c +++ b/src/ast_mode.c @@ -406,9 +406,6 @@ VBIOS_DAC_INFO DAC_VGA[] = { { 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0x00 }, }; -/* extern. function */ -extern Bool bInitHWC(ScrnInfoPtr pScrn, ASTRecPtr pAST); - /* Prototype type declaration*/ Bool ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode); Bool bGetAST1000VGAModeInfo(ScrnInfoPtr pScrn, DisplayModePtr mode, PVBIOS_MODE_INFO pVGAModeInfo); @@ -477,7 +474,7 @@ ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode) #endif #ifdef HWC if (!pAST->noHWC) { - if (!bInitHWC(pScrn, pAST)) { + if (!bASTInitHWC(pScrn, pAST)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Init HWC failed\n"); pAST->noHWC = TRUE; } -- cgit v1.2.3