From f3593918a0507cc080875788b2776ebe4f57c694 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 16 Dec 2015 09:21:39 +1000 Subject: [PATCH] xfree86: move check for driver->PreInit up 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 Reviewed-by: Keith Packard --- 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 2dca13044..a9ce62a98 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);