From eef864d36de97903007f04fad9fa43afe297745b Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 25 May 2012 15:19:41 +0200 Subject: fontconfig xserver xkeyboard-config pixman git update 2012 --- xorg-server/hw/xfree86/common/xf86Bus.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'xorg-server/hw/xfree86/common/xf86Bus.c') diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c index b176e8cc4..b8764344b 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.c +++ b/xorg-server/hw/xfree86/common/xf86Bus.c @@ -420,6 +420,26 @@ xf86AddDevToEntity(int entityIndex, GDevPtr dev) dev->claimed = TRUE; } + +void +xf86RemoveDevFromEntity(int entityIndex, GDevPtr dev) +{ + EntityPtr pEnt; + int i, j; + if (entityIndex >= xf86NumEntities) + return; + + pEnt = xf86Entities[entityIndex]; + for (i = 0; i < pEnt->numInstances; i++) { + if (pEnt->devices[i] == dev) { + for (j = i; j < pEnt->numInstances - 1; j++) + pEnt->devices[j] = pEnt->devices[j + 1]; + break; + } + } + pEnt->numInstances--; + dev->claimed = FALSE; +} /* * xf86GetEntityInfo() -- This function hands information from the * EntityRec struct to the drivers. The EntityRec structure itself -- cgit v1.2.3