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>
This commit is contained in:
parent
fc4fbe8224
commit
f3593918a0
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user