[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-aiptek: Changes to 'upstream-unstable'



 .gitignore       |   76 +++-
 COPYING          |   33 +
 Makefile.am      |   11 
 configure.ac     |   58 +--
 man/Makefile.am  |   61 +--
 man/aiptek.man   |    1 
 src/Makefile.am  |    4 
 src/xf86Aiptek.c |  946 +++++++++++++++++++------------------------------------
 src/xf86Aiptek.h |   45 --
 9 files changed, 489 insertions(+), 746 deletions(-)

New commits:
commit 8a8693bda6e8a7d4acbf0e680570d45f71b122cc
Author: Cyril Brulebois <kibi@debian.org>
Date:   Wed May 4 03:18:44 2011 +0200

    xf86-input-aiptek 1.4.0
    
    Signed-off-by: Cyril Brulebois <kibi@debian.org>

diff --git a/configure.ac b/configure.ac
index 3c771a4..f13daff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-aiptek],
-        [1.3.99],
+        [1.4.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-aiptek])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 4691e88b8c9b187e1fb9e8a8f8266297a0ee60b6
Author: Cyril Brulebois <kibi@debian.org>
Date:   Wed May 4 03:17:52 2011 +0200

    Remove leftover configure check on randrproto.
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Cyril Brulebois <kibi@debian.org>

diff --git a/configure.ac b/configure.ac
index fbcc9c6..3c771a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,6 @@ AC_CHECK_LIB([m],[sqrt])
 AC_CHECK_HEADERS([linux/input.h])
 
 # Store the list of server defined extensions in REQUIRED_MODULES
-XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
 
 # Obtain compiler/linker options from server and required extensions

commit 74af23f20662f06e34325fb29ac55e16547707b3
Author: Trevor Woerner <twoerner@gmail.com>
Date:   Mon Jan 17 23:04:50 2011 -0500

    Address compiler warning.
    
    When compiling gcc warns:
    
        'rc' may be used uninitialized in this function
    
    which is plausible if none of the "if/else" cases are matched.
    
    Signed-off-by: Trevor Woerner <twoerner@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Julien Cristau <jcristau@debian.org>

diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index f128fa0..d9a7665 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -1808,7 +1808,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     InputInfoPtr    pInfos;
     char*             s;
     int               shared;
-    int               rc;
+    int               rc = BadValue;
 
     aiptekDrv = drv;
 

commit 95b89123904fd62e0e253ffd4ce3c4d8359d5ed6
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 2 11:59:33 2010 +1000

    Support input ABI 12.
    
    New PreInit() prototype, extra valuator modes.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Trevor Woerner <twoerner@gmail.com>

diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index f5263ca..f128fa0 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -124,10 +124,14 @@
 #include <X11/Xatom.h>
 #include <xserver-properties.h>
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+#error "Need a server with input ABI 12"
+#endif
+
 static InputDriverPtr aiptekDrv;
 static int debug_level = INI_DEBUG_LEVEL;
 
-static const char *default_options[] =
+static char *default_options[] =
 {
     "BaudRate",     "9600",
     "StopBits",     "1",
@@ -147,6 +151,7 @@ _X_EXPORT InputDriverRec AIPTEK =
     xf86AiptekInit,     /* pre-init */
     xf86AiptekUninit,   /* un-init */
     NULL,               /* module */
+    default_options
 };
 
 /*
@@ -870,7 +875,6 @@ xf86AiptekHIDOpen(InputInfoPtr pInfo)
     {
         common->deviceArray[i]->read_input = xf86AiptekHIDReadInput;
         common->deviceArray[i]->fd = pInfo->fd;
-        common->deviceArray[i]->flags |= XI86_CONFIGURED;
     }
     common->open = xf86AiptekHIDOpen;
 
@@ -1329,7 +1333,8 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
                device->xBottom - device->xTop,      /* max value */
                LPI2CPM(375),                        /* resolution */
                LPI2CPM(375),                        /* min_resolution */
-               LPI2CPM(375));                       /* max_resolution */
+               LPI2CPM(375),                        /* max_resolution */
+               Absolute);
 
     InitValuatorAxisStruct(pDriver,                 /* Y Resolution */
                1,                                   /* axis_id */
@@ -1338,7 +1343,8 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
                device->yBottom - device->yTop,      /* max value */
                LPI2CPM(375),                        /* resolution */
                LPI2CPM(375),                        /* min_resolution */
-               LPI2CPM(375));                       /* max_resolution */
+               LPI2CPM(375),                        /* max_resolution */
+               Absolute);
 
     InitValuatorAxisStruct(pDriver,                 /* Pressure */
                2,                                   /* axis_id */
@@ -1347,7 +1353,8 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
                511,                                 /* max value */
                512,                                 /* resolution */
                512,                                 /* min_resolution */
-               512);                                /* max_resolution */
+               512,                                 /* max_resolution */
+               Absolute);
 
     InitValuatorAxisStruct(pDriver,                 /* xTilt */
                3,                                   /* axis id */
@@ -1356,7 +1363,8 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
                127,                                 /* max value */
                256,                                 /* resolution */
                256,                                 /* min_resolution */
-               256);                                /* max_resolution */
+               256,                                 /* max_resolution */
+               Absolute);
 
     InitValuatorAxisStruct(pDriver,                 /* yTilt */
                4,                                   /* axis_id */
@@ -1365,7 +1373,8 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
                127,                                 /* max value */
                256,                                 /* resolution */
                256,                                 /* min_resolution */
-               256);                                /* max_resolution */
+               256,                                 /* max_resolution */
+               Absolute);
 
     /*
      * The sixth axis would be for wheel support. We do not have
@@ -1600,14 +1609,14 @@ xf86AiptekSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode)
 }
 
 /*
- * xf86AiptekAllocate
- * Allocates the device structures for the Aiptek.
+ * xf86AiptekInitialize
+ * Initializes the device structures for the Aiptek.
  */
-static InputInfoPtr
-xf86AiptekAllocate(char* name,
-                int   flag)
+static int
+xf86AiptekAllocate(InputInfoPtr pInfo,
+                   char* name,
+                   int   flag)
 {
-    InputInfoPtr    pInfo;
     InputInfoPtr*   deviceArray;
     AiptekDevicePtr   device;
     AiptekCommonPtr   common;
@@ -1618,7 +1627,7 @@ xf86AiptekAllocate(char* name,
     if (!device)
     {
         DBG(3, "xf86AiptekAllocate failed to allocate 'device'\n");
-        return NULL;
+        return BadAlloc;
     }
 
     common = (AiptekCommonPtr) malloc(sizeof(AiptekCommonRec));
@@ -1626,7 +1635,7 @@ xf86AiptekAllocate(char* name,
     {
         DBG(3, "xf86AiptekAllocate failed to allocate 'common'\n");
         free(device);
-        return NULL;
+        return BadAlloc;
     }
 
     deviceArray = (InputInfoPtr*) malloc(sizeof(InputInfoPtr));
@@ -1635,33 +1644,17 @@ xf86AiptekAllocate(char* name,
         DBG(3, "xf86AiptekAllocate failed to allocate 'deviceArray'\n");
         free(device);
         free(common);
-        return NULL;
+        return BadAlloc;
     }
 
-
-    pInfo = xf86AllocateInput(aiptekDrv, 0);
-    if (!pInfo)
-    {
-        DBG(3, "xf86AiptekAllocate failed at xf86AllocateInput()\n");
-        free(device);
-        free(common);
-        free(deviceArray);
-        return NULL;
-    }
-
-    pInfo->name =                       name;
     pInfo->type_name =                  "Aiptek";
-    pInfo->flags =                      0;
     pInfo->device_control =             xf86AiptekProc;
     pInfo->read_input =                 xf86AiptekHIDReadInput;
     pInfo->control_proc =               xf86AiptekChangeControl;
     pInfo->switch_mode =                xf86AiptekSwitchMode;
 
     pInfo->fd =             VALUE_NA;
-    pInfo->atom =           0;
-    pInfo->dev =            NULL;
     pInfo->private =        device;
-    pInfo->private_flags =  0;
 
     device->flags =         flag;       /* various flags (device type, 
                                          * coordinate type */
@@ -1729,53 +1722,49 @@ xf86AiptekAllocate(char* name,
     common->zCapacity =     0;              /* tablet's max Z value */
     common->open =          xf86AiptekOpen; /* Open function */
 
-    return pInfo;
+    return Success;
 }
 
 /*
  * xf86AiptekAllocateStylus
  */
-static InputInfoPtr
-xf86AiptekAllocateStylus(void)
+static int
+xf86AiptekAllocateStylus(InputInfoPtr pInfo)
 {
-    InputInfoPtr pInfo = xf86AiptekAllocate(XI_STYLUS, STYLUS_ID);
-    
-    if (pInfo)
-    {
-        pInfo->type_name = "Stylus";
-    }
-    return pInfo;
+    int rc;
+
+    rc = xf86AiptekAllocate(pInfo, XI_STYLUS, STYLUS_ID);
+    pInfo->type_name = "Stylus";
+
+    return rc;
 }
 
 /*
  * xf86AiptekAllocateCursor
  */
-static InputInfoPtr
-xf86AiptekAllocateCursor(void)
+static int
+xf86AiptekAllocateCursor(InputInfoPtr pInfo)
 {
-    InputInfoPtr pInfo = xf86AiptekAllocate(XI_CURSOR, CURSOR_ID);
-    
-    if (pInfo)
-    {
-        pInfo->type_name = "Cursor";
-    }
-    return pInfo;
+    int rc;
+
+    rc = xf86AiptekAllocate(pInfo, XI_CURSOR, CURSOR_ID);
+    pInfo->type_name = "Cursor";
+
+    return rc;
 }
 
 /*
  * xf86AiptekAllocateEraser
  */
-static InputInfoPtr
-xf86AiptekAllocateEraser(void)
+static int
+xf86AiptekAllocateEraser(InputInfoPtr pInfo)
 {
-    InputInfoPtr pInfo = xf86AiptekAllocate(XI_ERASER,
-            ABSOLUTE_FLAG|ERASER_ID);
-    
-    if (pInfo)
-    {
-        pInfo->type_name = "Eraser";
-    }
-    return pInfo;
+    int rc;
+
+    rc = xf86AiptekAllocate(pInfo, XI_ERASER, ABSOLUTE_FLAG|ERASER_ID);
+    pInfo->type_name = "Eraser";
+
+    return rc;
 }
 
 /*
@@ -1809,73 +1798,50 @@ xf86AiptekUninit(InputDriverPtr    drv,
  *
  * Called when the module subsection is found in XF86Config
  */
-static InputInfoPtr
+static int
 xf86AiptekInit(InputDriverPtr    drv,
-               IDevPtr           dev,
+               InputInfoPtr      pInfo,
                int               flags)
 {
-    InputInfoPtr    pInfo     = NULL;
-    InputInfoPtr    fakepInfo = NULL;
     AiptekDevicePtr   device    = NULL;
     AiptekCommonPtr   common    = NULL;
     InputInfoPtr    pInfos;
     char*             s;
     int               shared;
+    int               rc;
 
     aiptekDrv = drv;
 
     xf86Msg(X_INFO, "xf86AiptekInit(): begins\n");
 
-    fakepInfo = (InputInfoPtr) calloc(1, sizeof(InputInfoRec));
-    if (!fakepInfo)
-    {
-        return NULL;
-    }
-
-    fakepInfo->conf_idev = dev;
-
-    /*
-     * fakepInfo is here so it can have default serial init values.
-     * Is this something to remove? TODO
-     */
-    xf86CollectInputOptions(fakepInfo, default_options, NULL);
-
 /* Type */
-    s = xf86FindOptionValue(fakepInfo->options, "Type");
+    s = xf86FindOptionValue(pInfo->options, "Type");
     if (s && (xf86NameCmp(s, "stylus") == 0))
     {
-        pInfo = xf86AiptekAllocateStylus();
+        rc = xf86AiptekAllocateStylus(pInfo);
     }
     else if (s && (xf86NameCmp(s, "cursor") == 0))
     {
-        pInfo = xf86AiptekAllocateCursor();
+        rc = xf86AiptekAllocateCursor(pInfo);
     }
     else if (s && (xf86NameCmp(s, "eraser") == 0))
     {
-        pInfo = xf86AiptekAllocateEraser();
+        rc = xf86AiptekAllocateEraser(pInfo);
     }
     else
     {
         xf86Msg(X_ERROR, "%s: No type or invalid type specified.\n"
                   "Must be one of 'stylus', 'cursor', or 'eraser'\n",
-                  dev->identifier);
+                  pInfo->name);
     }
 
-    if(!pInfo)
-    {
-        free(fakepInfo);
-        return NULL;
-    }
+    if(rc != Success)
+        return rc;
 
     device = (AiptekDevicePtr) pInfo->private;
 
     common              = device->common;
 
-    pInfo->options      = fakepInfo->options;
-    pInfo->conf_idev    = fakepInfo->conf_idev;
-    pInfo->name         = dev->identifier;
-    free(fakepInfo);
-
 /* Device */
 /* (mandatory) */
     common->deviceName = xf86FindOptionValue(pInfo->options, "Device");
@@ -2236,11 +2202,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     }
     xf86Msg(X_CONFIG, "%s: xf86AiptekInit() finished\n", pInfo->name);
 
-    /* Mark the device as configured */
-    pInfo->flags |= XI86_CONFIGURED;
-
-    /* return the pInfoDevice */
-    return (pInfo);
+    return Success;
 
 SetupProc_fail:
     if (common)
@@ -2249,7 +2211,7 @@ SetupProc_fail:
         free(device);
     if (pInfo)
         free(pInfo);
-    return NULL;
+    return BadValue;
 }
 
 /*
diff --git a/src/xf86Aiptek.h b/src/xf86Aiptek.h
index 91db608..f686be2 100644
--- a/src/xf86Aiptek.h
+++ b/src/xf86Aiptek.h
@@ -347,12 +347,12 @@ typedef struct _AiptekCommonRec
     Bool (*open)(InputInfoPtr);   /* function to open (serial or USB) */
 } AiptekCommonRec, *AiptekCommonPtr;
 
-static InputInfoPtr xf86AiptekInit(InputDriverPtr, IDevPtr, int);
+static int xf86AiptekInit(InputDriverPtr, InputInfoPtr, int);
 static void xf86AiptekUninit(InputDriverPtr, InputInfoPtr, int);
 static void xf86AiptekClose(InputInfoPtr);
-static InputInfoPtr xf86AiptekAllocateStylus(void);
-static InputInfoPtr xf86AiptekAllocateCursor(void);
-static InputInfoPtr xf86AiptekAllocateEraser(void);
+static int xf86AiptekAllocateStylus(InputInfoPtr);
+static int xf86AiptekAllocateCursor(InputInfoPtr);
+static int xf86AiptekAllocateEraser(InputInfoPtr);
 
 #define SYSCALL(call) while(((call) == -1) && (errno == EINTR))
 #define ABS(x) ((x) > 0 ? (x) : -(x))

commit 26f171f205bfd6f7a51ed273ef9ac5ae7ebc1a86
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 2 11:52:34 2010 +1000

    Remove unused bell and kbd callbacks.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Trevor Woerner <twoerner@gmail.com>

diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index 04837e5..f5263ca 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -1376,23 +1376,6 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
 }
 
 /*
- * xf86AiptekBellCallback
- */
-static void
-xf86AiptekBellCallback(int pct, DeviceIntPtr di, pointer ctrl, int x)
-{
-}
-
-/*
- * xf86AiptekKbdCtrlCallback
- */
-static void
-xf86AiptekKbdCtrlCallback(DeviceIntPtr di, KeybdCtrl* ctrl)
-{
-}
-
-
-/*
  * xf86AiptekProc
  *
  *  Call dispatcher for this driver.

commit 7708830a034fd5a0ad696007ed11d3b6c558e178
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 2 11:45:47 2010 +1000

    Drop unused DeviceAssocRec
    
    Dropped from the server for not being referenced anywhere, see commit below
    
    commit 2b7840b63da6bc00aa40e8a427d9fd719ba5e6d0
    Author: Peter Hutterer <peter.hutterer@who-t.net>
    Date:   Fri Jul 30 13:44:20 2010 +1000
    
        xfree86: remove unused DeviceAssocRec struct.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Trevor Woerner <twoerner@gmail.com>

diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index 919a47d..04837e5 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -1796,33 +1796,6 @@ xf86AiptekAllocateEraser(void)
 }
 
 /*
- * Stylus device association
- */
-DeviceAssocRec aiptek_stylus_assoc =
-{
-    STYLUS_SECTION_NAME,        /* config_section_name */
-    xf86AiptekAllocateStylus    /* device_allocate */
-};
-
-/*
- * Cursor device association
- */
-DeviceAssocRec aiptek_cursor_assoc =
-{
-    CURSOR_SECTION_NAME,        /* config_section_name */
-    xf86AiptekAllocateCursor    /* device_allocate */
-};
-
-/*
- * Eraser device association
- */
-DeviceAssocRec aiptek_eraser_assoc =
-{
-    ERASER_SECTION_NAME,        /* config_section_name */
-    xf86AiptekAllocateEraser    /* device_allocate */
-};
-
-/*
  * xf86AiptekUninit --
  *
  * called when the driver is unloaded.

commit 5f08edaba640b43df462f77143e657d58181bf21
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 2 11:43:06 2010 +1000

    Drop close_proc, conversion_proc, reverse_conversion_proc
    
    All three aren't called by the server.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Trevor Woerner <twoerner@gmail.com>

diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index 9bb1b9c..919a47d 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -170,133 +170,6 @@ static int linux_inputDevice_keyMap[] =
     KEY_OPEN, KEY_PASTE
 };
 
-/*
- * xf86AiptekConvert
- * Convert valuators to X and Y. We deal with multiple X screens, adjusting
- * for xTop/xBottom/yTop/yBottom (or xSize/ySize).
- */
-static Bool
-xf86AiptekConvert(InputInfoPtr pInfo,
-                  int            first,
-                  int            num,
-                  int            v0,
-                  int            v1,
-                  int            v2,
-                  int            v3,
-                  int            v4,
-                  int            v5,
-                  int*           x,
-                  int*           y)
-{
-    AiptekDevicePtr device = (AiptekDevicePtr) pInfo->private;
-    int  xSize, ySize;
-    int  width, height;
-    ScreenPtr pScreen = miPointerGetScreen(pInfo->dev);
-
-    DBG(15, " xf86AiptekConvert(), with: first=%d, num=%d, v0=%d, "
-		   "v1=%d, v2=%d, v3=%d,, v4=%d, v5=%d, x=%d, y=%d\n",
-		   first, num, v0, v1, v2, v3, v4, v5, *x, *y);
-
-    /* Change the screen number if it differs from that which
-     * the pointer is currently on
-     */
-    if (pScreen->myNum != device->screenNo)
-    {
-        device->screenNo = pScreen->myNum;
-    }
-
-    if (first != 0 || num == 1)
-    {
-        return FALSE;
-    }
-
-    xSize = device->xBottom - device->xTop;
-    ySize = device->yBottom - device->yTop;
-
-    width  = screenInfo.screens[device->screenNo]->width;
-    height = screenInfo.screens[device->screenNo]->height;
-
-    *x = (v0 * width)  / xSize;
-    *y = (v1 * height) / ySize;
-
-    /* Deal with coordinate inversion */
-    if ( device->flags & INVX_FLAG)
-    {
-        *x = width - *x;
-    }
-    if ( device->flags & INVY_FLAG)
-    {
-        *y = height - *y;
-    }
-
-    /* Normalize the adjusted sizes. */
-    if (*x < 0)
-    {
-        *x = 0;
-    }
-    if (*x > width)
-    {
-        *x = width;
-    }
-
-    if (*y < 0)
-    {
-        *y = 0;
-    }
-    if (*y > height)
-    {
-        *y = height;
-    }
-
-    if (device->screenNo != 0)
-    {
-        xf86XInputSetScreen(pInfo, device->screenNo, *x, *y);
-    }
-    DBG(15, "xf86AiptekConvert() exits, with: x=%d, y=%d\n", *x, *y);
-
-    return TRUE;
-}
-
-/*
- * xf86AiptekReverseConvert
- * Convert X and Y to valuators.
- */
-static Bool
-xf86AiptekReverseConvert(InputInfoPtr pInfo,
-                         int            x,
-                         int            y,
-                         int*           valuators)
-{
-    AiptekDevicePtr device = (AiptekDevicePtr) pInfo->private;
-    int    xSize, ySize;
-
-    DBG(15,  "xf86AiptekReverseConvert(), with: x=%d, y=%d, "
-		    "valuators[0]=%d, valuators[1]=%d\n",
-		    x, y, valuators[0], valuators[1] );
-
-    /*
-     * Adjust by tablet ratio
-     */
-    xSize = device->xBottom - device->xTop;
-    ySize = device->yBottom - device->yTop;
-
-    valuators[0] = (x*xSize) / screenInfo.screens[device->screenNo]->width;
-    valuators[1] = (y*ySize) / screenInfo.screens[device->screenNo]->height;
-
-    DBG(15, "converted x,y (%d, %d) to (%d, %d)\n",
-                    x, y, valuators[0], valuators[1] );
-
-    if (device->screenNo != 0)
-    {
-        xf86XInputSetScreen(pInfo,device->screenNo,valuators[0], valuators[1]);
-    }
-    DBG(15, ": xf86AiptekReverseConvert() exits, with: "
-		   "valuators[0]=%d, valuators[1]=%d\n",
-		   valuators[0], valuators[1] );
-
-    return TRUE;
-}
-
 /**********************************************************************
  * xf86AiptekSendEvents
  *  Send events according to the device state.
@@ -1799,10 +1672,7 @@ xf86AiptekAllocate(char* name,
     pInfo->device_control =             xf86AiptekProc;
     pInfo->read_input =                 xf86AiptekHIDReadInput;
     pInfo->control_proc =               xf86AiptekChangeControl;
-    pInfo->close_proc =                 xf86AiptekClose;
     pInfo->switch_mode =                xf86AiptekSwitchMode;
-    pInfo->conversion_proc =            xf86AiptekConvert;
-    pInfo->reverse_conversion_proc =    xf86AiptekReverseConvert;
 
     pInfo->fd =             VALUE_NA;
     pInfo->atom =           0;

commit d48d8f9b89bbdf703fb42477f1ec86d6b6db51ee
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 2 11:41:28 2010 +1000

    Use pInfo->name instead of dev->identifier
    
    no functional changes, prep work for ABI 12
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Trevor Woerner <twoerner@gmail.com>

diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index ba02444..9bb1b9c 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -2055,7 +2055,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     common->deviceName = xf86FindOptionValue(pInfo->options, "Device");
     if(!common->deviceName)
     {
-        xf86Msg(X_ERROR, "%s: No Device specified.\n", dev->identifier);
+        xf86Msg(X_ERROR, "%s: No Device specified.\n", pInfo->name);
         goto SetupProc_fail;
     }
 
@@ -2116,7 +2116,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     }
 
     /* Optional configuration */
-    xf86Msg(X_CONFIG, "%s device is %s\n", dev->identifier,
+    xf86Msg(X_CONFIG, "%s device is %s\n", pInfo->name,
             common->deviceName);
 
 /* DebugLevel */
@@ -2143,7 +2143,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     else if (s)
     {
         xf86Msg(X_ERROR, "%s: invalid Mode ('normal', 'soft' or 'hard').\n",
-            dev->identifier);
+            pInfo->name);
     }
 
 /* Mode */
@@ -2159,7 +2159,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     else if (s)
     {
         xf86Msg(X_ERROR, "%s: invalid Mode ('absolute' or 'relative').\n",
-            dev->identifier);
+            pInfo->name);
         device->flags |= ABSOLUTE_FLAG;
     }
     xf86Msg(X_CONFIG, "%s is in %s mode\n", pInfo->name,
@@ -2180,7 +2180,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     {
         pInfo->read_input=xf86AiptekHIDReadInput;
         common->open=xf86AiptekHIDOpen;
-        xf86Msg(X_CONFIG, "%s: reading USB link\n", dev->identifier);
+        xf86Msg(X_CONFIG, "%s: reading USB link\n", pInfo->name);
     }
 #else
     if (xf86SetBoolOption(pInfo->options, "USB", 0))
@@ -2195,14 +2195,14 @@ xf86AiptekInit(InputDriverPtr    drv,
     if (device->screenNo != VALUE_NA)
     {
         xf86Msg(X_CONFIG, "%s: attached to screen number %d\n",
-                dev->identifier, device->screenNo);
+                pInfo->name, device->screenNo);
     }
 
 /* KeepShape */
     if (xf86SetBoolOption(pInfo->options, "KeepShape", 0))
     {
         device->flags |= KEEP_SHAPE_FLAG;
-        xf86Msg(X_CONFIG, "%s: keeps shape\n", dev->identifier);
+        xf86Msg(X_CONFIG, "%s: keeps shape\n", pInfo->name);
     }
 
 /* XSize */
@@ -2210,7 +2210,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     device->xSize = xf86SetIntOption(pInfo->options, "SizeX", device->xSize);
     if (device->xSize != VALUE_NA) 
     {
-        xf86Msg(X_CONFIG, "%s: XSize/SizeX = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: XSize/SizeX = %d\n", pInfo->name,
                 device->xSize);
     }
 
@@ -2219,7 +2219,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     device->ySize = xf86SetIntOption(pInfo->options, "SizeY", device->ySize);
     if (device->ySize != VALUE_NA) 
     {
-        xf86Msg(X_CONFIG, "%s: YSize/SizeY = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: YSize/SizeY = %d\n", pInfo->name,
                 device->ySize);
     }
 
@@ -2230,7 +2230,7 @@ xf86AiptekInit(InputDriverPtr    drv,
             device->xOffset);
     if (device->xOffset != VALUE_NA)
     {
-        xf86Msg(X_CONFIG, "%s: XOffset/OffsetX = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: XOffset/OffsetX = %d\n", pInfo->name,
                 device->xOffset);
     }
 
@@ -2241,7 +2241,7 @@ xf86AiptekInit(InputDriverPtr    drv,
             device->yOffset);
     if (device->yOffset != VALUE_NA)
     {
-        xf86Msg(X_CONFIG, "%s: YOffset/OffsetY = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: YOffset/OffsetY = %d\n", pInfo->name,
                 device->yOffset);
     }
 
@@ -2253,7 +2253,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     if (device->xThreshold != VALUE_NA)
     {
         xf86Msg(X_CONFIG, "%s: XThreshold/ThresholdX = %d\n",
-                dev->identifier, device->xThreshold);
+                pInfo->name, device->xThreshold);
     }
 
 /* YThreshold */
@@ -2264,7 +2264,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     if (device->yThreshold != VALUE_NA)
     {
         xf86Msg(X_CONFIG, "%s: YThreshold/ThresholdY = %d\n",
-                dev->identifier, device->yThreshold);
+                pInfo->name, device->yThreshold);
     }
 
 /* ZThreshold */
@@ -2275,7 +2275,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     if (device->zThreshold != VALUE_NA)
     {
         xf86Msg(X_CONFIG, "%s: ZThreshold/ThresholdZ = %d\n",
-                dev->identifier, device->zThreshold);
+                pInfo->name, device->zThreshold);
     }
 
 /* XTiltThreshold */
@@ -2286,7 +2286,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     if (device->xTiltThreshold != VALUE_NA)
     {
         xf86Msg(X_CONFIG, "%s: XTiltThreshold = %d\n",
-                dev->identifier, device->xTiltThreshold);
+                pInfo->name, device->xTiltThreshold);
     }
 
 /* YTiltThreshold */
@@ -2297,7 +2297,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     if (device->yTiltThreshold != VALUE_NA)
     {
         xf86Msg(X_CONFIG, "%s: YTiltThreshold = %d\n",
-                dev->identifier, device->yTiltThreshold);
+                pInfo->name, device->yTiltThreshold);
     }
 
 /* XMax */
@@ -2305,7 +2305,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     device->xMax = xf86SetIntOption(pInfo->options, "MaxX", device->xMax);
     if (device->xMax != VALUE_NA)
     {
-        xf86Msg(X_CONFIG, "%s: XMax/MaxX = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: XMax/MaxX = %d\n", pInfo->name,
                 device->xMax);
     }
 
@@ -2314,7 +2314,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     device->yMax = xf86SetIntOption(pInfo->options, "MaxY", device->yMax);
     if (device->yMax != VALUE_NA)
     {
-        xf86Msg(X_CONFIG, "%s: YMax/MaxY = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: YMax/MaxY = %d\n", pInfo->name,
                 device->yMax);
     }
 
@@ -2323,7 +2323,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     device->zMax = xf86SetIntOption(pInfo->options, "MaxZ", device->zMax);
     if (device->zMax != VALUE_NA)
     {
-        xf86Msg(X_CONFIG, "%s: ZMax/MaxZ = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: ZMax/MaxZ = %d\n", pInfo->name,
                 device->zMax);
     }
 
@@ -2332,7 +2332,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     device->zMin = xf86SetIntOption(pInfo->options, "MinZ", device->zMin);
     if (device->zMin != VALUE_NA)
     {
-        xf86Msg(X_CONFIG, "%s: ZMin/MinZ = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: ZMin/MinZ = %d\n", pInfo->name,
                 device->zMin);
     }
 
@@ -2341,7 +2341,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     device->xTop = xf86SetIntOption(pInfo->options, "XTop", device->xTop);
     if (device->xTop != VALUE_NA)
     {
-        xf86Msg(X_CONFIG, "%s: TopX/XTop = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: TopX/XTop = %d\n", pInfo->name,
                 device->xTop);
     }
 
@@ -2350,7 +2350,7 @@ xf86AiptekInit(InputDriverPtr    drv,
     device->yTop = xf86SetIntOption(pInfo->options, "YTop", device->yTop);
     if (device->yTop != VALUE_NA)
     {
-        xf86Msg(X_CONFIG, "%s: TopY/YTop = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: TopY/YTop = %d\n", pInfo->name,
                 device->yTop);
     }
 
@@ -2361,7 +2361,7 @@ xf86AiptekInit(InputDriverPtr    drv,
             device->xBottom);
     if (device->xBottom != VALUE_NA)
     {
-        xf86Msg(X_CONFIG, "%s: BottomX/XBottom = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: BottomX/XBottom = %d\n", pInfo->name,
                 device->xBottom);
     }
 
@@ -2372,7 +2372,7 @@ xf86AiptekInit(InputDriverPtr    drv,
             device->yBottom);
     if (device->yBottom != VALUE_NA)
     {
-        xf86Msg(X_CONFIG, "%s: BottomY/YBottom = %d\n", dev->identifier,
+        xf86Msg(X_CONFIG, "%s: BottomY/YBottom = %d\n", pInfo->name,
                 device->yBottom);
     }
 
@@ -2380,14 +2380,14 @@ xf86AiptekInit(InputDriverPtr    drv,
     if (xf86SetBoolOption(pInfo->options, "InvX", FALSE))
     {
         device->flags |= INVX_FLAG;
-        xf86Msg(X_CONFIG, "%s: InvX\n", dev->identifier);
+        xf86Msg(X_CONFIG, "%s: InvX\n", pInfo->name);
     }
 
 /* InvY */
     if (xf86SetBoolOption(pInfo->options, "InvY", FALSE))
     {
         device->flags |= INVY_FLAG;
-        xf86Msg(X_CONFIG, "%s: InvY\n", dev->identifier);
+        xf86Msg(X_CONFIG, "%s: InvY\n", pInfo->name);
     }
 
 /* BaudRate */
@@ -2403,12 +2403,12 @@ xf86AiptekInit(InputDriverPtr    drv,
                 break;
             default:
                 xf86Msg(X_ERROR, "%s: Illegal BaudRate (9600 or 19200).",
-                        dev->identifier);
+                        pInfo->name);
                 break;
         }
-        xf86Msg(X_CONFIG, "%s: BaudRate %u\n", dev->identifier, val);
+        xf86Msg(X_CONFIG, "%s: BaudRate %u\n", pInfo->name, val);
     }
-    xf86Msg(X_CONFIG, "%s: xf86AiptekInit() finished\n", dev->identifier);
+    xf86Msg(X_CONFIG, "%s: xf86AiptekInit() finished\n", pInfo->name);
 
     /* Mark the device as configured */
     pInfo->flags |= XI86_CONFIGURED;

commit 91d3f3ac38042f180dfccd504a9c335de687b657
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 2 11:33:53 2010 +1000

    unifdef XFree86LOADER
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Trevor Woerner <twoerner@gmail.com>

diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index e433c3b..ba02444 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -2433,7 +2433,6 @@ SetupProc_fail:
  *
  ***************************************************************************
  */


Reply to: