xfree86: remove unused xf86AccessInit()

The function was only initializing the boolean xf86ResAccessEnter, which
couldn't get any other value in the life of the server.

The only possible, though suspicious, code was in xf86AccessLeave(), which
could be triggered if AbortDDX is called before xf86AccessInit(). Even so,
such change is safety because no driver would have configured any entity leave
procedure at this point.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Tiago Vignatti 2010-05-02 19:53:37 +03:00
parent 673eb707ce
commit b37462b4da
3 changed files with 3 additions and 21 deletions

View File

@ -58,8 +58,6 @@ static int xf86EntityPrivateCount = 0;
BusRec primaryBus = { BUS_NONE, { 0 } };
static Bool xf86ResAccessEnter = FALSE;
static Bool doFramebufferMode = FALSE;
/*
@ -385,16 +383,6 @@ xf86GetDevFromEntity(int entityIndex, int instance)
return xf86Entities[entityIndex]->devices[i];
}
/*
* xf86AccessInit() - set up everything needed for access control
* called only once on first server generation.
*/
void
xf86AccessInit(void)
{
xf86ResAccessEnter = TRUE;
}
/*
* xf86AccessEnter() -- gets called to save the text mode VGA IO
* resources when reentering the server after a VT switch.
@ -402,8 +390,7 @@ xf86AccessInit(void)
void
xf86AccessEnter(void)
{
if (xf86ResAccessEnter)
return;
return;
/*
* on enter we simply disable routing of special resources
@ -411,7 +398,6 @@ xf86AccessEnter(void)
*/
EntityEnter();
xf86EnterServerState(SETUP);
xf86ResAccessEnter = TRUE;
}
/*
@ -426,8 +412,7 @@ xf86AccessEnter(void)
void
xf86AccessLeave(void)
{
if (!xf86ResAccessEnter)
return;
return;
EntityLeave();
}

View File

@ -700,10 +700,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
/*
* Locate bus slot that had register IO enabled at server startup
*/
if (xorgHWAccess) {
xf86AccessInit();
if (xorgHWAccess)
xf86FindPrimaryDevice();
}
/*
* Now call each of the Probe functions. Each successful probe will
* result in an extra entry added to the xf86Screens[] list for each

View File

@ -112,7 +112,6 @@ extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable;
/* xf86Bus.c */
extern _X_EXPORT void xf86BusProbe(void);
extern _X_EXPORT void xf86AccessInit(void);
extern _X_EXPORT void xf86AccessEnter(void);
extern _X_EXPORT void xf86AccessLeave(void);
extern _X_EXPORT void xf86EntityInit(void);