xfree86: bus: remove SetSIGIOForState and simplify the code
Also removed some dumb debug messages. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
211ca67e4d
commit
f28515b5f7
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user