[PATCH acecad 2/7] Replace LocalDevicePtr with InputInfoPtr.

Peter Hutterer peter.hutterer at who-t.net
Thu Sep 9 17:56:36 PDT 2010


LocalDevicePtr was removed with input ABI 12, but InputInfoPtr has been
around for years anyway.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
CC: Giuseppe Bilotta <giuseppe.bilotta at gmail.org>
---
 src/acecad.c |   26 +++++++++++++-------------
 src/acecad.h |   15 +++++++--------
 2 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/src/acecad.c b/src/acecad.c
index d895756..7ca6c2d 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -216,7 +216,7 @@ static char acecad_driver_name[11] = "usb_acecad";
 #endif
 
 static Bool
-AceCadAutoDevProbe(LocalDevicePtr local, int verb)
+AceCadAutoDevProbe(InputInfoPtr local, int verb)
 {
     /* We are trying to find the right eventX device */
     int i = 0;
@@ -332,7 +332,7 @@ ProbeFound:
 static InputInfoPtr
 AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 {
-    LocalDevicePtr local = xf86AllocateInput(drv, 0);
+    InputInfoPtr local = xf86AllocateInput(drv, 0);
     AceCadPrivatePtr priv = xcalloc (1, sizeof(AceCadPrivateRec));
     int speed;
     int msgtype;
@@ -527,7 +527,7 @@ static Bool
 DeviceOn (DeviceIntPtr dev)
 {
     char buffer[256];
-    LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
+    InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate;
     AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private);
 
     xf86MsgVerb(X_INFO, 4, "%s Device On\n", local->name);
@@ -570,7 +570,7 @@ DeviceOn (DeviceIntPtr dev)
 static Bool
 DeviceOff (DeviceIntPtr dev)
 {
-    LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
+    InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate;
     AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private);
 
     xf86MsgVerb(X_INFO, 4, "%s Device Off\n", local->name);
@@ -595,7 +595,7 @@ DeviceOff (DeviceIntPtr dev)
 static Bool
 DeviceClose (DeviceIntPtr dev)
 {
-    LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
+    InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate;
 
     xf86MsgVerb(X_INFO, 4, "%s Device Close\n", local->name);
 
@@ -605,7 +605,7 @@ DeviceClose (DeviceIntPtr dev)
 static void
 ControlProc(DeviceIntPtr dev, PtrCtrl *ctrl)
 {
-    LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
+    InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate;
 
     xf86MsgVerb(X_INFO, 4, "%s Control Proc\n", local->name);
 }
@@ -614,7 +614,7 @@ static Bool
 DeviceInit (DeviceIntPtr dev)
 {
     int rx, ry;
-    LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
+    InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate;
     AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private);
     unsigned char map[] = {0, 1, 2, 3};
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
@@ -755,7 +755,7 @@ DeviceInit (DeviceIntPtr dev)
 }
 
 static void
-ReadInput (LocalDevicePtr local)
+ReadInput (InputInfoPtr local)
 {
     int x, y, z;
     int prox, buttons;
@@ -857,7 +857,7 @@ ReadInput (LocalDevicePtr local)
 #ifdef HAVE_LINUX_INPUT_H
 #define set_bit(byte,nb,bit)	(bit ? byte | (1<<nb) : byte & (~(1<<nb)))
 static void
-USBReadInput (LocalDevicePtr local)
+USBReadInput (InputInfoPtr local)
 {
     int len;
     struct input_event * event;
@@ -1012,7 +1012,7 @@ USBReadInput (LocalDevicePtr local)
 #endif
 
 static void
-CloseProc (LocalDevicePtr local)
+CloseProc (InputInfoPtr local)
 {
 }
 
@@ -1022,7 +1022,7 @@ CloseProc (LocalDevicePtr local)
  * to simulate mouse events.
  */
 static Bool
-ConvertProc (LocalDevicePtr local, int first, int num,
+ConvertProc (InputInfoPtr local, int first, int num,
         int v0, int v1, int v2, int v3, int v4, int v5,
         int *x, int *y)
 {
@@ -1039,7 +1039,7 @@ ConvertProc (LocalDevicePtr local, int first, int num,
 
 
 static Bool
-ReverseConvertProc (LocalDevicePtr local,
+ReverseConvertProc (InputInfoPtr local,
         int x, int  y,
         int *valuators)
 {
@@ -1105,7 +1105,7 @@ QueryHardware (AceCadPrivatePtr priv)
 
 #ifdef HAVE_LINUX_INPUT_H
 static Bool
-USBQueryHardware (LocalDevicePtr local)
+USBQueryHardware (InputInfoPtr local)
 {
     AceCadPrivatePtr	priv = (AceCadPrivatePtr) local->private;
     unsigned long	bit[EV_MAX][NBITS(KEY_MAX)];
diff --git a/src/acecad.h b/src/acecad.h
index fc06348..49721e0 100644
--- a/src/acecad.h
+++ b/src/acecad.h
@@ -100,21 +100,20 @@ static Bool DeviceOn (DeviceIntPtr);
 static Bool DeviceOff (DeviceIntPtr);
 static Bool DeviceClose (DeviceIntPtr);
 static Bool DeviceInit (DeviceIntPtr);
-static void ReadInput (LocalDevicePtr);
-static void CloseProc (LocalDevicePtr);
-static Bool ConvertProc (LocalDevicePtr, int, int, int, int, int, int, int, int, int *, int *);
-static Bool ReverseConvertProc(LocalDevicePtr , int , int , int*);
+static void ReadInput (InputInfoPtr);
+static void CloseProc (InputInfoPtr);
+static Bool ConvertProc (InputInfoPtr, int, int, int, int, int, int, int, int, int *, int *);
+static Bool ReverseConvertProc(InputInfoPtr , int , int , int*);
 static Bool QueryHardware (AceCadPrivatePtr);
 static void NewPacket (AceCadPrivatePtr priv);
 static Bool AceCadGetPacket (AceCadPrivatePtr);
 static InputInfoPtr AceCadPreInit(InputDriverPtr, IDevPtr , int);
 #ifdef HAVE_LINUX_INPUT_H
-static void USBReadInput (LocalDevicePtr);
-static Bool USBQueryHardware (LocalDevicePtr);
+static void USBReadInput (InputInfoPtr);
+static Bool USBQueryHardware (InputInfoPtr);
 static int IsUSBLine(int);
 static Bool fd_query_acecad(int, char*);
-static Bool AceCadAutoDevProbe(LocalDevicePtr, int);
+static Bool AceCadAutoDevProbe(InputInfoPtr, int);
 #endif
 
-
 #endif
-- 
1.7.2.3



More information about the xorg-devel mailing list