summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-10-31 17:05:40 +1030
committerPeter Hutterer <peter.hutterer@redhat.com>2008-10-31 18:26:18 +1030
commit971aef64416058665bc903fee39fea1619cd3727 (patch)
treea04fdac1151957d9ac1b70bddbc50a1f2ab83aba /dix
parent3c3a47d0f5ce7fb9548a3eefee9e72488d3ac279 (diff)
dix: FreeDeviceClass() and friends can be static.
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/dix/devices.c b/dix/devices.c
index 1e7588e59..2ec928415 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -659,31 +659,10 @@ InitAndStartDevices()
return Success;
}
-_X_EXPORT void
-FreeAllDeviceClasses(ClassesPtr classes)
-{
- if (!classes)
- return;
-
- FreeDeviceClass(KeyClass, (pointer)&classes->key);
- FreeDeviceClass(ValuatorClass, (pointer)&classes->valuator);
- FreeDeviceClass(ButtonClass, (pointer)&classes->button);
- FreeDeviceClass(FocusClass, (pointer)&classes->focus);
- FreeDeviceClass(ProximityClass, (pointer)&classes->proximity);
-
- FreeFeedbackClass(KbdFeedbackClass, (pointer)&classes->kbdfeed);
- FreeFeedbackClass(PtrFeedbackClass, (pointer)&classes->ptrfeed);
- FreeFeedbackClass(IntegerFeedbackClass, (pointer)&classes->intfeed);
- FreeFeedbackClass(StringFeedbackClass, (pointer)&classes->stringfeed);
- FreeFeedbackClass(BellFeedbackClass, (pointer)&classes->bell);
- FreeFeedbackClass(LedFeedbackClass, (pointer)&classes->leds);
-
-}
-
/**
* Free the given device class and reset the pointer to NULL.
*/
-_X_EXPORT void
+static void
FreeDeviceClass(int type, pointer *class)
{
if (!(*class))
@@ -742,7 +721,8 @@ FreeDeviceClass(int type, pointer *class)
}
*class = NULL;
}
-_X_EXPORT void
+
+static void
FreeFeedbackClass(int type, pointer *class)
{
if (!(*class))
@@ -828,6 +808,28 @@ FreeFeedbackClass(int type, pointer *class)
}
*class = NULL;
}
+
+static void
+FreeAllDeviceClasses(ClassesPtr classes)
+{
+ if (!classes)
+ return;
+
+ FreeDeviceClass(KeyClass, (pointer)&classes->key);
+ FreeDeviceClass(ValuatorClass, (pointer)&classes->valuator);
+ FreeDeviceClass(ButtonClass, (pointer)&classes->button);
+ FreeDeviceClass(FocusClass, (pointer)&classes->focus);
+ FreeDeviceClass(ProximityClass, (pointer)&classes->proximity);
+
+ FreeFeedbackClass(KbdFeedbackClass, (pointer)&classes->kbdfeed);
+ FreeFeedbackClass(PtrFeedbackClass, (pointer)&classes->ptrfeed);
+ FreeFeedbackClass(IntegerFeedbackClass, (pointer)&classes->intfeed);
+ FreeFeedbackClass(StringFeedbackClass, (pointer)&classes->stringfeed);
+ FreeFeedbackClass(BellFeedbackClass, (pointer)&classes->bell);
+ FreeFeedbackClass(LedFeedbackClass, (pointer)&classes->leds);
+
+}
+
/**
* Close down a device and free all resources.
* Once closed down, the driver will probably not expect you that you'll ever