xfree86: bus: simplify entity related hooks

Remove some out dated commentaries either.

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 21:14:53 +03:00
parent 971768e688
commit 2464eb7d56
4 changed files with 17 additions and 55 deletions

View File

@ -108,21 +108,6 @@ StringToBusType(const char* busID, const char **retID)
return ret;
}
/*
* Entity related code.
*/
void
xf86EntityInit(void)
{
int i;
for (i = 0; i < xf86NumEntities; i++)
if (xf86Entities[i]->entityInit) {
xf86Entities[i]->entityInit(i,xf86Entities[i]->private);
}
}
int
xf86AllocateEntity(void)
{
@ -135,28 +120,6 @@ xf86AllocateEntity(void)
return (xf86NumEntities - 1);
}
static void
EntityEnter(void)
{
int i;
for (i = 0; i < xf86NumEntities; i++)
if (xf86Entities[i]->entityEnter) {
xf86Entities[i]->entityEnter(i,xf86Entities[i]->private);
}
}
static void
EntityLeave(void)
{
int i;
for (i = 0; i < xf86NumEntities; i++)
if (xf86Entities[i]->entityLeave) {
xf86Entities[i]->entityLeave(i,xf86Entities[i]->private);
}
}
Bool
xf86IsEntityPrimary(int entityIndex)
{
@ -388,27 +351,23 @@ xf86GetDevFromEntity(int entityIndex, int instance)
void
xf86AccessEnter(void)
{
/*
* on enter we simply disable routing of special resources
* to any bus and let the RAC code to "open" the right bridges.
*/
EntityEnter();
int i;
for (i = 0; i < xf86NumEntities; i++)
if (xf86Entities[i]->entityEnter)
xf86Entities[i]->entityEnter(i,xf86Entities[i]->private);
xf86EnterServerState(SETUP);
}
/*
* xf86AccessLeave() -- prepares access for and calls the
* entityLeave() functions.
* xf86AccessLeaveState() --- gets called to restore the
* access to the VGA IO resources when switching VT or on
* server exit.
* This was split to call xf86AccessLeaveState() from
* ddxGiveUp().
*/
void
xf86AccessLeave(void)
{
EntityLeave();
int i;
for (i = 0; i < xf86NumEntities; i++)
if (xf86Entities[i]->entityLeave)
xf86Entities[i]->entityLeave(i,xf86Entities[i]->private);
}
/*
@ -480,6 +439,8 @@ xf86EnterServerState(xf86State state)
void
xf86PostProbe(void)
{
int i;
if (fbSlotClaimed && (pciSlotClaimed
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
|| sbusSlotClaimed
@ -487,6 +448,10 @@ xf86PostProbe(void)
))
FatalError("Cannot run in framebuffer mode. Please specify busIDs "
" for all framebuffer devices\n");
for (i = 0; i < xf86NumEntities; i++)
if (xf86Entities[i]->entityInit)
xf86Entities[i]->entityInit(i,xf86Entities[i]->private);
}
void

View File

@ -818,7 +818,6 @@ DoConfigure(void)
}
xf86PostProbe();
xf86EntityInit();
for (j = 0; j < xf86NumScreens; j++) {
xf86Screens[j]->scrnIndex = j;

View File

@ -786,7 +786,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
}
xf86PostProbe();
xf86EntityInit();
/*
* Sort the drivers to match the requested ording. Using a slow

View File

@ -114,7 +114,6 @@ extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable;
extern _X_EXPORT void xf86BusProbe(void);
extern _X_EXPORT void xf86AccessEnter(void);
extern _X_EXPORT void xf86AccessLeave(void);
extern _X_EXPORT void xf86EntityInit(void);
extern _X_EXPORT void xf86FindPrimaryDevice(void);
/* new RAC */