diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-03-12 13:19:32 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2014-03-13 13:11:47 +0100 |
commit | 4e3d9690e1868d286dcb766b429f9c99313f2401 (patch) | |
tree | 24c329dadbe5d8df1a14c46c4d6f05ca58191105 | |
parent | ddc3888bbaaddc47706a9cb96459738683d72cb3 (diff) |
systemd_logind_find_info_ptr_by_devnum: Move to higher inside the file
This is a preparation patch for adding support for server managed fds
for InputDevices where multiple input devices share the same device node (and
thus also their major and minor).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | hw/xfree86/os-support/linux/systemd-logind.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c index 09db33633..012a9204e 100644 --- a/hw/xfree86/os-support/linux/systemd-logind.c +++ b/hw/xfree86/os-support/linux/systemd-logind.c @@ -51,6 +51,20 @@ struct systemd_logind_info { static struct systemd_logind_info logind_info; +static InputInfoPtr +systemd_logind_find_info_ptr_by_devnum(InputInfoPtr start, + int major, int minor) +{ + InputInfoPtr pInfo; + + for (pInfo = start; pInfo; pInfo = pInfo->next) + if (pInfo->major == major && pInfo->minor == minor && + (pInfo->flags & XI86_SERVER_FD)) + return pInfo; + + return NULL; +} + int systemd_logind_take_fd(int _major, int _minor, const char *path, Bool *paused_ret) @@ -203,20 +217,6 @@ systemd_logind_vtenter(void) xf86InputEnableVTProbe(); } -static InputInfoPtr -systemd_logind_find_info_ptr_by_devnum(InputInfoPtr start, - int major, int minor) -{ - InputInfoPtr pInfo; - - for (pInfo = start; pInfo; pInfo = pInfo->next) - if (pInfo->major == major && pInfo->minor == minor && - (pInfo->flags & XI86_SERVER_FD)) - return pInfo; - - return NULL; -} - static void systemd_logind_ack_pause(struct systemd_logind_info *info, dbus_int32_t minor, dbus_int32_t major) |