aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/common')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c14
-rw-r--r--xorg-server/hw/xfree86/common/xf86platformBus.h5
2 files changed, 12 insertions, 7 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index 36b92a9f7..bc6b73f91 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.c
@@ -81,8 +81,12 @@
#include <stdarg.h>
#include <stdint.h> /* for int64_t */
+#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#ifdef HAVE_SYS_MKDEV_H
+#include <sys/mkdev.h> /* for major() & minor() on Solaris */
+#endif
#include "mi.h"
@@ -766,6 +770,11 @@ xf86DeleteInput(InputInfoPtr pInp, int flags)
FreeInputAttributes(pInp->attrs);
+ if (pInp->flags & XI86_SERVER_FD) {
+ systemd_logind_release_fd(pInp->major, pInp->minor);
+ close(pInp->fd);
+ }
+
/* Remove the entry from the list. */
if (pInp == xf86InputDevs)
xf86InputDevs = pInp->next;
@@ -779,11 +788,6 @@ xf86DeleteInput(InputInfoPtr pInp, int flags)
/* Else the entry wasn't in the xf86InputDevs list (ignore this). */
}
- if (pInp->flags & XI86_SERVER_FD) {
- systemd_logind_release_fd(pInp->major, pInp->minor);
- close(pInp->fd);
- }
-
free((void *) pInp->driver);
free((void *) pInp->name);
xf86optionListFree(pInp->options);
diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.h b/xorg-server/hw/xfree86/common/xf86platformBus.h
index 78b5a5bea..5dee4e0e0 100644
--- a/xorg-server/hw/xfree86/common/xf86platformBus.h
+++ b/xorg-server/hw/xfree86/common/xf86platformBus.h
@@ -54,11 +54,12 @@ xf86_add_platform_device(struct OdevAttributes *attribs, Bool unowned);
extern int
xf86_remove_platform_device(int dev_index);
extern Bool
+xf86_get_platform_device_unowned(int index);
+/* Note starting with xserver 1.16 these 2 functions never fail */
+extern Bool
xf86_add_platform_device_attrib(int index, int attrib_id, char *attrib_str);
extern Bool
xf86_add_platform_device_int_attrib(int index, int attrib_id, int attrib_value);
-extern Bool
-xf86_get_platform_device_unowned(int index);
extern int
xf86platformAddDevice(int index);