[PATCH 08/10] xfree86: bus: remove SetSIGIOForState and simplify the code

Tiago Vignatti tiago.vignatti at nokia.com
Fri May 7 05:44:03 PDT 2010


Also removed some dumb debug messages.

Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 hw/xfree86/common/xf86Bus.c |   36 ++++++++----------------------------
 1 files changed, 8 insertions(+), 28 deletions(-)

diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 3c963c4..80cb911 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -399,39 +399,26 @@ xf86EnableAccess(ScrnInfoPtr pScrn)
 
 typedef enum { TRI_UNSET, TRI_TRUE, TRI_FALSE } TriState;
 
-static void
-SetSIGIOForState(xf86State state)
+void
+xf86EnterServerState(xf86State state)
 {
     static int sigio_state;
     static TriState sigio_blocked = TRI_UNSET;
 
+	/*
+     * This is a good place to block SIGIO during SETUP state. SIGIO should be
+	 * blocked in SETUP state otherwise (u)sleep() might get interrupted
+	 * early. We take care not to call xf86BlockSIGIO() twice.
+     */
     if ((state == SETUP) && (sigio_blocked != TRI_TRUE)) {
         sigio_state = xf86BlockSIGIO();
-	sigio_blocked = TRI_TRUE;
+        sigio_blocked = TRI_TRUE;
     } else if ((state == OPERATING) && (sigio_blocked != TRI_UNSET)) {
         xf86UnblockSIGIO(sigio_state);
         sigio_blocked = TRI_FALSE;
     }
 }
 
-void
-xf86EnterServerState(xf86State state)
-{
-    /* 
-     * This is a good place to block SIGIO during SETUP state.
-     * SIGIO should be blocked in SETUP state otherwise (u)sleep()
-     * might get interrupted early. 
-     * We take care not to call xf86BlockSIGIO() twice. 
-     */
-    SetSIGIOForState(state);
-    if (state == SETUP)
-	DebugF("Entering SETUP state\n");
-    else
-	DebugF("Entering OPERATING state\n");
-
-    return;
-}
-
 /*
  * xf86PostProbe() -- Allocate all non conflicting resources
  * This function gets called by xf86Init().
@@ -458,13 +445,6 @@ void
 xf86PostScreenInit(void)
 {
     xf86VGAarbiterWrapFunctions();
-
-    if (fbSlotClaimed) {
-	SetSIGIOForState(OPERATING);
-	return;
-    }
-
-    DebugF("PostScreenInit  generation: %i\n",serverGeneration);
     xf86EnterServerState(OPERATING);
 }
 
-- 
1.6.0.4



More information about the xorg-devel mailing list