[PATCH xserver] xfree86: move check for driver->PreInit up
Peter Hutterer
peter.hutterer at who-t.net
Thu Dec 17 17:56:08 PST 2015
No real change, but if the driver is broken and doesn't provide a PreInit
function, then we don't need to worry about logind.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
hw/xfree86/common/xf86Xinput.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 2dca130..a9ce62a 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -860,6 +860,17 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
goto unwind;
}
+ xf86Msg(X_INFO, "Using input driver '%s' for '%s'\n", drv->driverName,
+ pInfo->name);
+
+ if (!drv->PreInit) {
+ xf86Msg(X_ERROR,
+ "Input driver `%s' has no PreInit function (ignoring)\n",
+ drv->driverName);
+ rval = BadImplementation;
+ goto unwind;
+ }
+
path = xf86CheckStrOption(pInfo->options, "Device", NULL);
if (path && pInfo->major == 0 && pInfo->minor == 0)
xf86stat(path, &pInfo->major, &pInfo->minor);
@@ -887,17 +898,6 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
free(path);
- xf86Msg(X_INFO, "Using input driver '%s' for '%s'\n", drv->driverName,
- pInfo->name);
-
- if (!drv->PreInit) {
- xf86Msg(X_ERROR,
- "Input driver `%s' has no PreInit function (ignoring)\n",
- drv->driverName);
- rval = BadImplementation;
- goto unwind;
- }
-
xf86AddInput(drv, pInfo);
rval = drv->PreInit(drv, pInfo, 0);
--
2.5.0
More information about the xorg-devel
mailing list