xfree86: remove bus state change notification callback

No one is using bus notifications now. We hope that the kernel take care of
this properly.

For other not-so-urgent-notifications (ACPI wakeups, etc) we can just register
a handler on server's scheduler (using xf86AddGeneralHandler). And for
external applications, the "trend" is to use HAL to kick notifications. So
we're already provided of enough notification schemes.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
This commit is contained in:
Tiago Vignatti 2009-08-19 18:20:54 +03:00
commit 792dee3854
4 changed files with 0 additions and 69 deletions

View file

@ -62,10 +62,6 @@ static Bool xf86ResAccessEnter = FALSE;
static Bool doFramebufferMode = FALSE;
/* state change notification callback list */
static StateChangeNotificationPtr StateChangeNotificationList;
static void notifyStateChange(xf86NotifyState state);
/*
* Call the bus probes relevant to the architecture.
*
@ -414,7 +410,6 @@ xf86AccessEnter(void)
* to any bus and let the RAC code to "open" the right bridges.
*/
EntityEnter();
notifyStateChange(NOTIFY_ENTER);
xf86EnterServerState(SETUP);
xf86ResAccessEnter = TRUE;
}
@ -433,7 +428,6 @@ xf86AccessLeave(void)
{
if (!xf86ResAccessEnter)
return;
notifyStateChange(NOTIFY_LEAVE);
EntityLeave();
}
@ -505,7 +499,6 @@ xf86EnterServerState(xf86State state)
/* When servicing a dumb framebuffer we don't need to do anything */
if (doFramebufferMode) return;
notifyStateChange(NOTIFY_ENABLE);
return;
}
@ -527,7 +520,6 @@ xf86PostProbe(void)
return;
} else {
xf86Msg(X_INFO,"Running in FRAMEBUFFER Mode\n");
notifyStateChange(NOTIFY_ENABLE);
doFramebufferMode = TRUE;
return;
@ -587,46 +579,6 @@ xf86FindPrimaryDevice(void)
}
}
void
xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg)
{
StateChangeNotificationPtr ptr =
(StateChangeNotificationPtr)xnfalloc(sizeof(StateChangeNotificationRec));
ptr->func = func;
ptr->arg = arg;
ptr->next = StateChangeNotificationList;
StateChangeNotificationList = ptr;
}
Bool
xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func)
{
StateChangeNotificationPtr *ptr = &StateChangeNotificationList;
StateChangeNotificationPtr tmp;
while (*ptr) {
if ((*ptr)->func == func) {
tmp = (*ptr);
(*ptr) = (*ptr)->next;
xfree(tmp);
return TRUE;
}
ptr = &((*ptr)->next);
}
return FALSE;
}
static void
notifyStateChange(xf86NotifyState state)
{
StateChangeNotificationPtr ptr = StateChangeNotificationList;
while (ptr) {
ptr->func(state,ptr->arg);
ptr = ptr->next;
}
}
/* Multihead accel sharing accessor functions and entity Private handling */
int