[PATCH v2 synaptics 07/11] Renamed SynapticsHwInfo in PS2SynapticsHwInfo

Alexandr Shadchin alexandr.shadchin at gmail.com
Mon Feb 28 03:38:25 PST 2011


Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
---
 src/ps2comm.c |   24 ++++++++++++------------
 src/ps2comm.h |    4 ++--
 src/psmcomm.c |    8 ++++----
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/ps2comm.c b/src/ps2comm.c
index 1ea09c9..6991d22 100644
--- a/src/ps2comm.c
+++ b/src/ps2comm.c
@@ -214,7 +214,7 @@ ps2_synaptics_reset(int fd)
  * see also SYN_MODEL_* macros
  */
 static Bool
-ps2_synaptics_model_id(int fd, struct SynapticsHwInfo *synhw)
+ps2_synaptics_model_id(int fd, struct PS2SynapticsHwInfo *synhw)
 {
     byte mi[3];
 
@@ -239,7 +239,7 @@ ps2_synaptics_model_id(int fd, struct SynapticsHwInfo *synhw)
  * see also the SYN_CAP_* macros
  */
 static Bool
-ps2_synaptics_capability(int fd, struct SynapticsHwInfo *synhw)
+ps2_synaptics_capability(int fd, struct PS2SynapticsHwInfo *synhw)
 {
     byte cap[3];
 
@@ -279,7 +279,7 @@ ps2_synaptics_capability(int fd, struct SynapticsHwInfo *synhw)
  * See also the SYN_ID_* macros
  */
 static Bool
-ps2_synaptics_identify(int fd, struct SynapticsHwInfo *synhw)
+ps2_synaptics_identify(int fd, struct PS2SynapticsHwInfo *synhw)
 {
     byte id[3];
 
@@ -315,7 +315,7 @@ ps2_synaptics_disable_device(int fd)
 }
 
 static Bool
-ps2_query_is_synaptics(int fd, struct SynapticsHwInfo* synhw)
+ps2_query_is_synaptics(int fd, struct PS2SynapticsHwInfo* synhw)
 {
     int i;
 
@@ -335,7 +335,7 @@ ps2_query_is_synaptics(int fd, struct SynapticsHwInfo* synhw)
 }
 
 void
-ps2_print_ident(const struct SynapticsHwInfo *synhw)
+ps2_print_ident(const struct PS2SynapticsHwInfo *synhw)
 {
     xf86Msg(X_PROBED, " Synaptics Touchpad, model: %d\n", SYN_ID_MODEL(synhw));
     xf86Msg(X_PROBED, " Firmware: %d.%d\n", SYN_ID_MAJOR(synhw),
@@ -381,11 +381,11 @@ PS2QueryHardware(InputInfoPtr pInfo)
 {
     int mode;
     SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
-    struct SynapticsHwInfo *synhw;
+    struct PS2SynapticsHwInfo *synhw;
 
     if (!priv->proto_data)
-        priv->proto_data = calloc(1, sizeof(struct SynapticsHwInfo));
-    synhw = (struct SynapticsHwInfo*)priv->proto_data;
+        priv->proto_data = calloc(1, sizeof(struct PS2SynapticsHwInfo));
+    synhw = (struct PS2SynapticsHwInfo*)priv->proto_data;
 
     /* is the synaptics touchpad active? */
     if (!ps2_query_is_synaptics(pInfo->fd, synhw))
@@ -424,7 +424,7 @@ PS2QueryHardware(InputInfoPtr pInfo)
  * Decide if the current packet stored in priv->protoBuf is valid.
  */
 static Bool
-ps2_packet_ok(struct SynapticsHwInfo *synhw, struct CommData *comm)
+ps2_packet_ok(struct PS2SynapticsHwInfo *synhw, struct CommData *comm)
 {
     unsigned char *buf = comm->protoBuf;
     int newabs = SYN_MODEL_NEWABS(synhw);
@@ -453,7 +453,7 @@ ps2_packet_ok(struct SynapticsHwInfo *synhw, struct CommData *comm)
 }
 
 static Bool
-ps2_synaptics_get_packet(InputInfoPtr pInfo, struct SynapticsHwInfo *synhw,
+ps2_synaptics_get_packet(InputInfoPtr pInfo, struct PS2SynapticsHwInfo *synhw,
 			 struct SynapticsProtocolOperations *proto_ops,
 			 struct CommData *comm)
 {
@@ -522,11 +522,11 @@ PS2ReadHwState(InputInfoPtr pInfo,
     struct SynapticsHwState *hw = &(comm->hwState);
     SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
     SynapticsParameters *para = &priv->synpara;
-    struct SynapticsHwInfo *synhw;
+    struct PS2SynapticsHwInfo *synhw;
     int newabs;
     int w, i;
 
-    synhw = (struct SynapticsHwInfo*)priv->proto_data;
+    synhw = (struct PS2SynapticsHwInfo*)priv->proto_data;
     if (!synhw)
     {
         xf86Msg(X_ERROR,
diff --git a/src/ps2comm.h b/src/ps2comm.h
index 99ff3ec..2cf6a23 100644
--- a/src/ps2comm.h
+++ b/src/ps2comm.h
@@ -94,7 +94,7 @@
 
 typedef unsigned char byte;
 
-struct SynapticsHwInfo {
+struct PS2SynapticsHwInfo {
     unsigned int model_id;		/* Model-ID */
     unsigned int capabilities;		/* Capabilities */
     unsigned int ext_cap;		/* Extended Capabilities */
@@ -102,6 +102,6 @@ struct SynapticsHwInfo {
 };
 
 Bool ps2_putbyte(int fd, byte b);
-void ps2_print_ident(const struct SynapticsHwInfo *synhw);
+void ps2_print_ident(const struct PS2SynapticsHwInfo *synhw);
 
 #endif /* _PS2COMM_H_ */
diff --git a/src/psmcomm.c b/src/psmcomm.c
index 88263ae..596db48 100644
--- a/src/psmcomm.c
+++ b/src/psmcomm.c
@@ -103,7 +103,7 @@ PSMQueryIsSynaptics(InputInfoPtr pInfo)
 }
 
 static void
-convert_hw_info(const synapticshw_t *psm_ident, struct SynapticsHwInfo *synhw)
+convert_hw_info(const synapticshw_t *psm_ident, struct PS2SynapticsHwInfo *synhw)
 {
     memset(synhw, 0, sizeof(*synhw));
     synhw->model_id = ((psm_ident->infoRot180 << 23) |
@@ -130,14 +130,14 @@ static Bool
 PSMQueryHardware(InputInfoPtr pInfo)
 {
     synapticshw_t psm_ident;
-    struct SynapticsHwInfo *synhw;
+    struct PS2SynapticsHwInfo *synhw;
     SynapticsPrivate *priv;
 
     priv = (SynapticsPrivate *)pInfo->private;
 
     if(!priv->proto_data)
-        priv->proto_data = calloc(1, sizeof(struct SynapticsHwInfo));
-    synhw = (struct SynapticsHwInfo*)priv->proto_data;
+        priv->proto_data = calloc(1, sizeof(struct PS2SynapticsHwInfo));
+    synhw = (struct PS2SynapticsHwInfo*)priv->proto_data;
 
     /* is the synaptics touchpad active? */
     if (!PSMQueryIsSynaptics(pInfo))
-- 
1.7.3.5



More information about the xorg-devel mailing list