summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-10-31 16:50:28 +1030
committerPeter Hutterer <peter.hutterer@redhat.com>2008-10-31 18:26:18 +1030
commit12599af285a610fb429245798330f2317c75ac2c (patch)
treebafe04cf88292ec43f257af5cc4c2023b3552189 /dix
parent5d0a945a030cd7626046e9f6c8d5c6bd170649d9 (diff)
dix: NextFreePointerDevice() can be static.
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/dix/devices.c b/dix/devices.c
index d9541b2ea..11720e533 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -161,6 +161,20 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd)
}
+/**
+ * Find and return the next unpaired MD pointer device.
+ */
+static DeviceIntPtr
+NextFreePointerDevice(void)
+{
+ DeviceIntPtr dev;
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ if (dev->isMaster &&
+ dev->spriteInfo->spriteOwner &&
+ !dev->spriteInfo->paired)
+ return dev;
+ return NULL;
+}
/**
* Create a new input device and init it to sane values. The device is added
@@ -2643,17 +2657,6 @@ GuessFreePointerDevice()
return (lastRealPtr) ? lastRealPtr : inputInfo.pointer;
}
-DeviceIntPtr
-NextFreePointerDevice()
-{
- DeviceIntPtr dev;
- for (dev = inputInfo.devices; dev; dev = dev->next)
- if (dev->isMaster &&
- dev->spriteInfo->spriteOwner &&
- !dev->spriteInfo->paired)
- return dev;
- return NULL;
-}
/**
* Create a new master device (== one pointer, one keyboard device).
* Only allocates the devices, you will need to call ActivateDevice() and