summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-29 04:42:04 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-29 04:42:04 +0200
commit9b9b1d03609996dc3220870fa6e226c46c888c83 (patch)
tree75dae8e246597d1275e716c06c8fc88c5379f2d3 /src
parent93736ac2bf92ad342255a64120c2685f4074a0e9 (diff)
Centralize the success code for the probe routine.
Diffstat (limited to 'src')
-rw-r--r--src/acecad.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/acecad.c b/src/acecad.c
index 07211d6..73e88d7 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -273,10 +273,7 @@ AceCadAutoDevProbe(LocalDevicePtr local, int verb)
if (np < 0 || np >= EV_DEV_NAME_MAXLEN) {
xf86MsgVerb(X_WARNING, verb, "%s: unable to manage event device %d\n", local->name, i);
} else {
- xf86Msg(X_PROBED, "%s auto-dev sets device to %s\n",
- local->name, fname);
- xf86ReplaceStrOption(local->options, "Device", fname);
- return TRUE;
+ goto ProbeFound;
}
} else
xf86MsgVerb(X_WARNING, verb, "%s: no Acecad devices found via sysfs\n", local->name);
@@ -314,10 +311,7 @@ AceCadAutoDevProbe(LocalDevicePtr local, int verb)
is_acecad = fd_query_acecad(fd, ace_name);
SYSCALL(close(fd));
if (is_acecad) {
- xf86Msg(X_PROBED, "%s auto-dev sets device to %s\n",
- local->name, fname);
- xf86ReplaceStrOption(local->options, "Device", fname);
- return TRUE;
+ goto ProbeFound;
}
}
xf86MsgVerb(X_WARNING, verb, "%s: no Acecad event device found (checked %d nodes, no device name started with '%s')\n",
@@ -328,6 +322,12 @@ AceCadAutoDevProbe(LocalDevicePtr local, int verb)
if (i > max_skip && !have_evdev)
xf86MsgVerb(X_WARNING, verb, "%s: The evdev kernel module seems to be missing\n", local->name);
return FALSE;
+
+ProbeFound:
+ xf86Msg(X_PROBED, "%s auto-dev sets device to %s\n",
+ local->name, fname);
+ xf86ReplaceStrOption(local->options, "Device", fname);
+ return TRUE;
}
#endif