[PATCH] Input: synaptics - Simplified determining default dimensions

Alexandr Shadchin alexandr.shadchin at gmail.com
Fri Nov 5 02:21:49 PDT 2010


Simplified mechanism for determining the size of the working area.

Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
---
 src/alpscomm.c  |    2 +-
 src/ps2comm.c   |    2 +-
 src/psmcomm.c   |    2 +-
 src/synaptics.c |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/alpscomm.c b/src/alpscomm.c
index 84d2136..c5af681 100644
--- a/src/alpscomm.c
+++ b/src/alpscomm.c
@@ -233,5 +233,5 @@ struct SynapticsProtocolOperations alps_proto_operations = {
     ALPSQueryHardware,
     ALPSReadHwState,
     ALPSAutoDevProbe,
-    SynapticsDefaultDimensions
+    NULL
 };
diff --git a/src/ps2comm.c b/src/ps2comm.c
index 4e372b3..a34613e 100644
--- a/src/ps2comm.c
+++ b/src/ps2comm.c
@@ -672,5 +672,5 @@ struct SynapticsProtocolOperations psaux_proto_operations = {
     PS2QueryHardware,
     PS2ReadHwState,
     PS2AutoDevProbe,
-    SynapticsDefaultDimensions
+    NULL
 };
diff --git a/src/psmcomm.c b/src/psmcomm.c
index 66e8d1e..a7494dc 100644
--- a/src/psmcomm.c
+++ b/src/psmcomm.c
@@ -181,5 +181,5 @@ struct SynapticsProtocolOperations psm_proto_operations = {
     PSMQueryHardware,
     PSMReadHwState,
     PSMAutoDevProbe,
-    SynapticsDefaultDimensions
+    NULL
 };
diff --git a/src/synaptics.c b/src/synaptics.c
index f64a081..6171380 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -448,8 +448,6 @@ static void set_default_parameters(InputInfoPtr pInfo)
      * If the range was autodetected, apply these edge widths to all four
      * sides.
      */
-    SynapticsDefaultDimensions(pInfo);
-
     width = abs(priv->maxx - priv->minx);
     height = abs(priv->maxy - priv->miny);
     diag = sqrt(width * width + height * height);
@@ -2546,6 +2544,8 @@ ReadDevDimensions(InputInfoPtr pInfo)
 
     if (priv->proto_ops->ReadDevDimensions)
 	priv->proto_ops->ReadDevDimensions(pInfo);
+    else
+	SynapticsDefaultDimensions(pInfo);
 }
 
 static Bool
-- 
1.7.3.1



More information about the xorg-devel mailing list