Now SynapticsDefaultDimensions() called only once

Signed-off-by: Alexandr Shadchin <alexandr.shadc...@gmail.com>
---
 src/alpscomm.c     |    2 +-
 src/ps2comm.c      |    2 +-
 src/psmcomm.c      |    2 +-
 src/synaptics.c    |    6 ++++--
 src/synapticsstr.h |    3 ---
 5 files changed, 7 insertions(+), 8 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 741cd1d..903e6dd 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 a7dd566..1f5b68c 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -130,6 +130,7 @@ static Bool QueryHardware(InputInfoPtr);
 static void ReadDevDimensions(InputInfoPtr);
 static void ScaleCoordinates(SynapticsPrivate *priv, struct SynapticsHwState 
*hw);
 static void CalculateScalingCoeffs(SynapticsPrivate *priv);
+static void SynapticsDefaultDimensions(InputInfoPtr pInfo);
 
 void InitDeviceProperties(InputInfoPtr pInfo);
 int SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
@@ -183,7 +184,7 @@ _X_EXPORT XF86ModuleData synapticsModuleData = {
  * The default values 1900, etc. come from the dawn of time, when men where
  * men, or possibly apes.
  */
-void
+static void
 SynapticsDefaultDimensions(InputInfoPtr pInfo)
 {
     SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
@@ -444,7 +445,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);
@@ -2613,6 +2613,8 @@ ReadDevDimensions(InputInfoPtr pInfo)
 
     if (priv->proto_ops->ReadDevDimensions)
        priv->proto_ops->ReadDevDimensions(pInfo);
+
+    SynapticsDefaultDimensions(pInfo);
 }
 
 static Bool
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index 066b3f3..8f6593e 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -243,7 +243,4 @@ typedef struct _SynapticsPrivateRec
     enum TouchpadModel model;          /* The detected model */
 } SynapticsPrivate;
 
-
-extern void SynapticsDefaultDimensions(InputInfoPtr pInfo);
-
 #endif /* _SYNAPTICSSTR_H_ */
-- 
1.7.3.5

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to