diff options
author | marha <marha@users.sourceforge.net> | 2012-05-25 15:31:52 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-05-25 15:31:52 +0200 |
commit | e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66 (patch) | |
tree | 9e46ba338311cb6658589a7767ebcb7f525eb369 /xorg-server/hw/xfree86/common/xf86Bus.c | |
parent | aebbd673a0fb4d5e9ae4e8e690b29fb364376875 (diff) | |
parent | eef864d36de97903007f04fad9fa43afe297745b (diff) | |
download | vcxsrv-e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66.tar.gz vcxsrv-e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66.tar.bz2 vcxsrv-e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Bus.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Bus.c | 20 |
1 files changed, 20 insertions, 0 deletions
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 |