From f28515b5f774b83e0481acbcdda2f682738079b9 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Sun, 2 May 2010 21:24:46 +0300 Subject: [PATCH] xfree86: bus: remove SetSIGIOForState and simplify the code Also removed some dumb debug messages. Signed-off-by: Tiago Vignatti Reviewed-by: Adam Jackson --- hw/xfree86/common/xf86Bus.c | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 9bf4514a0..2a0c5c867 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -399,12 +399,17 @@ 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; @@ -414,24 +419,6 @@ SetSIGIOForState(xf86State state) } } -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); }