diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-12-16 09:21:39 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-12-21 07:15:30 +1000 |
commit | f3593918a0507cc080875788b2776ebe4f57c694 (patch) | |
tree | 68213faae725e7a754b032e2c20a7c7741e60a51 /hw/xfree86/common/xf86Xinput.c | |
parent | fc4fbe8224fdc8d7774120b6e978c652a70a50ee (diff) |
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 <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86/common/xf86Xinput.c')
-rw-r--r-- | hw/xfree86/common/xf86Xinput.c | 22 |
1 files 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); |