xfree86: append, not prepent, new input devices to xf86InputDevs.
If devices are prepended to the list, their wake-up order on resume is not the same as the original initialisation order. Hot-plugged devices, originally inited last, are re-enabled before the xorg.conf devices and in some cases may steal the device files. Result: we have different devices before and after suspend/resume. RedHat Bug 439386 <https://bugzilla.redhat.com/show_bug.cgi?id=439386>
This commit is contained in:
parent
5bcc45e07e
commit
11ee0ae939
|
@ -308,12 +308,11 @@ xf86AllocateScrnInfoPrivateIndex(void)
|
|||
return idx;
|
||||
}
|
||||
|
||||
/* Allocate a new InputInfoRec and add it to the head xf86InputDevs. */
|
||||
|
||||
/* Allocate a new InputInfoRec and append it to the tail of xf86InputDevs. */
|
||||
_X_EXPORT InputInfoPtr
|
||||
xf86AllocateInput(InputDriverPtr drv, int flags)
|
||||
{
|
||||
InputInfoPtr new;
|
||||
InputInfoPtr new, *prev = NULL;
|
||||
|
||||
if (!(new = xcalloc(sizeof(InputInfoRec), 1)))
|
||||
return NULL;
|
||||
|
@ -321,8 +320,13 @@ xf86AllocateInput(InputDriverPtr drv, int flags)
|
|||
new->drv = drv;
|
||||
drv->refCount++;
|
||||
new->module = DuplicateModule(drv->module, NULL);
|
||||
new->next = xf86InputDevs;
|
||||
xf86InputDevs = new;
|
||||
|
||||
for (prev = &xf86InputDevs; *prev; prev = &(*prev)->next)
|
||||
;
|
||||
|
||||
*prev = new;
|
||||
new->next = NULL;
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user