summaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 232e406..f33b201 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2366,14 +2366,16 @@ EvdevOpenDevice(InputInfoPtr pInfo)
}
#ifdef MULTITOUCH
- pEvdev->mtdev = mtdev_new_open(pInfo->fd);
+ if (!pEvdev->mtdev) { /* after PreInit mtdev is still valid */
+ pEvdev->mtdev = mtdev_new_open(pInfo->fd);
+ if (!pEvdev->mtdev) {
+ xf86Msg(X_ERROR, "%s: Couldn't open mtdev device\n", pInfo->name);
+ EvdevCloseDevice(pInfo);
+ return FALSE;
+ }
+ }
if (pEvdev->mtdev)
pEvdev->cur_slot = pEvdev->mtdev->caps.slot.value;
- else {
- xf86Msg(X_ERROR, "%s: Couldn't open mtdev device\n", pInfo->name);
- EvdevCloseDevice(pInfo);
- return FALSE;
- }
#endif
return Success;