Following on from the recent removal of the repeater fifo from the synaptics 
driver, these 3 patches clean up the code a bit:

01-synaptics-queryhardware-controlflow.diff simplifies the QueryHardware 
function a bit.

02-synaptics-queryhardware-message.diff reintroduces a message that informs 
the user that this driver cannot deal with the hardware for which it was 
configured.

03-synaptics-remove-unused.diff removes an unused #define and some #includes 
that were previously required for the fifo functionality.

Best Regards,

Magnus

Clean up control-flow

Signed-off-by: Magnus Kessler <[EMAIL PROTECTED]>

diff --git a/src/synaptics.c b/src/synaptics.c
index 148b3f6..8a6aeb7 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2186,10 +2186,10 @@ QueryHardware(LocalDevicePtr local)
 
     if (priv->proto_ops->QueryHardware(local, &priv->synhw)) {
 	para->synhw = priv->synhw;
-	return TRUE;
+    } else {
+	priv->proto_ops->DeviceOffHook(local);
     }
 
-    priv->proto_ops->DeviceOffHook(local);
     return TRUE;
 }
 
Re-introduce message about unsupported touchpad that was dropped with the
repeater device removal.

Signed-off-by: Magnus Kessler <[EMAIL PROTECTED]>

diff --git a/src/synaptics.c b/src/synaptics.c
index 8a6aeb7..c1db1d2 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2187,6 +2187,7 @@ QueryHardware(LocalDevicePtr local)
     if (priv->proto_ops->QueryHardware(local, &priv->synhw)) {
 	para->synhw = priv->synhw;
     } else {
+	xf86Msg(X_PROBED, "%s: no supported touchpad found\n", local->name);
 	priv->proto_ops->DeviceOffHook(local);
     }
 
Remove unused defines and includes

Signed-off-by: Magnus Kessler <[EMAIL PROTECTED]>

diff --git a/src/synaptics.c b/src/synaptics.c
index c1db1d2..4b3a022 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -59,15 +59,10 @@
 #endif
 
 #include <unistd.h>
-#include <sys/ioctl.h>
 #include <misc.h>
 #include <xf86.h>
 #include <sys/shm.h>
-#include <sys/ipc.h>
-#include <sys/stat.h>
-#include <errno.h>
 #include <math.h>
-#include <unistd.h>
 #include <stdio.h>
 #include <xf86_OSproc.h>
 #include <xf86Xinput.h>
@@ -92,7 +87,6 @@ typedef enum {
 #define MAX(a, b) (((a)>(b))?(a):(b))
 #define MIN(a, b) (((a)<(b))?(a):(b))
 #define TIME_DIFF(a, b) ((int)((a)-(b)))
-#define SYSCALL(call) while (((call) == -1) && (errno == EINTR))
 
 #define SQR(x) ((x) * (x))
 

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to