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

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



 ChangeLog        |  242 ++++++++++++++
 configure.ac     |    5 
 debian/changelog |   11 
 debian/control   |    3 
 man/aiptek.man   |    1 
 src/xf86Aiptek.c |  938 ++++++++++++++++++-------------------------------------
 src/xf86Aiptek.h |   39 --
 7 files changed, 579 insertions(+), 660 deletions(-)

New commits:
commit aad20351e540226d355f9bc5ff05e7c2b75b5c03
Author: Cyril Brulebois <kibi@debian.org>
Date:   Wed May 4 04:31:09 2011 +0200

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index 7769f6a..fcfad0b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-input-aiptek (1:1.4.0-1) UNRELEASED; urgency=low
+xserver-xorg-input-aiptek (1:1.4.0-1) unstable; urgency=low
 
   * New upstream release:
     - Compatible with xorg-server 1.10 (Closes: #624974).
@@ -7,7 +7,7 @@ xserver-xorg-input-aiptek (1:1.4.0-1) UNRELEASED; urgency=low
     an 1.10 server).
   * Drop x11proto-randr-dev build-dep, no longer needed.
 
- -- Cyril Brulebois <kibi@debian.org>  Wed, 04 May 2011 04:21:43 +0200
+ -- Cyril Brulebois <kibi@debian.org>  Wed, 04 May 2011 04:31:01 +0200
 
 xserver-xorg-input-aiptek (1:1.3.1-2) unstable; urgency=low
 

commit 3f7697608944932f451c6980a836c57e387b4173
Author: Cyril Brulebois <kibi@debian.org>
Date:   Wed May 4 04:30:29 2011 +0200

    Drop x11proto-randr-dev build-dep, no longer needed.

diff --git a/debian/changelog b/debian/changelog
index fe1b059..7769f6a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ xserver-xorg-input-aiptek (1:1.4.0-1) UNRELEASED; urgency=low
   * Bump xserver-xorg-dev build-dep (to something slightly higher than
     what's in configure.ac, since only ABI 12 is supported anyway, meaning
     an 1.10 server).
+  * Drop x11proto-randr-dev build-dep, no longer needed.
 
  -- Cyril Brulebois <kibi@debian.org>  Wed, 04 May 2011 04:21:43 +0200
 
diff --git a/debian/control b/debian/control
index df8ccdb..889693c 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,6 @@ Build-Depends:
  quilt,
  xserver-xorg-dev (>= 2:1.9.99.1),
  x11proto-core-dev,
- x11proto-randr-dev,
  x11proto-input-dev,
  xutils-dev (>= 1:7.5+4)
 Standards-Version: 3.9.1

commit 0ebb51cde670975a2e754ad43124e6f44813f1ec
Author: Cyril Brulebois <kibi@debian.org>
Date:   Wed May 4 04:29:47 2011 +0200

    Bump xserver-xorg-dev build-dep.
    
    Bump to something slightly higher than what's in configure.ac, since
    only ABI 12 is supported anyway, meaning an 1.10 server.

diff --git a/debian/changelog b/debian/changelog
index 55d91da..fe1b059 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ xserver-xorg-input-aiptek (1:1.4.0-1) UNRELEASED; urgency=low
 
   * New upstream release:
     - Compatible with xorg-server 1.10 (Closes: #624974).
+  * Bump xserver-xorg-dev build-dep (to something slightly higher than
+    what's in configure.ac, since only ABI 12 is supported anyway, meaning
+    an 1.10 server).
 
  -- Cyril Brulebois <kibi@debian.org>  Wed, 04 May 2011 04:21:43 +0200
 
diff --git a/debian/control b/debian/control
index ada7cca..df8ccdb 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends:
  dh-autoreconf,
  pkg-config,
  quilt,
- xserver-xorg-dev (>= 2:1.9.4),
+ xserver-xorg-dev (>= 2:1.9.99.1),
  x11proto-core-dev,
  x11proto-randr-dev,
  x11proto-input-dev,

commit 25ae9f185394519069db11c7d9cb0facd67a52d9
Author: Cyril Brulebois <kibi@debian.org>
Date:   Wed May 4 04:23:05 2011 +0200

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 4ccb0ac..415459b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,245 @@
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+commit f1799792c76b3b11326d4b8b54522cc9e55fca80
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 2 11:33:08 2010 +1000
+
+    drop xf86Verbose define
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 229f67067aa966099f1fb14e70507b77f78984b2
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 2 11:30:50 2010 +1000
+
+    Drop XCONFIG_PROBED and XCONFIG_GIVEN defines.
+    
+    XCONFIG_PROBED is the same as X_PROBED.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit bb25093da1f9b8252b2094179476ebe216575c29
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 2 11:29:02 2010 +1000
+
+    Sanitize DBG macro.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit e10f32bfcc3a84c34caa319088a4711f50d91118
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 2 11:23:34 2010 +1000
+
+    Replace ErrorF with xf86Msg
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 375b0d779eb58186a8181af08175079b28231afd
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 2 10:58:13 2010 +1000
+
+    Remove refcount field, removed from the server.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit fb442b1b868d0c0bfb2e9d1ba9b3aebb322c03fb
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 2 10:57:20 2010 +1000
+
+    Remove unused "identification" variable.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 17a8a52c34cdb25cf31ae6ca0fd2c741b6ce517c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 2 10:49:47 2010 +1000
+
+    Require server 1.9, drop pre-ABI 11 support.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 6d056bf2d07b044da17d741e900226c3ab6d9b83
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Sat Sep 11 01:37:15 2010 +1000
+
+    Don't handle history_size in the driver.
+    
+    This has been handled in the server for quite a while now, just initialize
+    with the defaults and ignore it otherwise.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 64e4b364cc01b9ada3f2afa0c5c4763b94f07854
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Sat Sep 11 01:36:08 2010 +1000
+
+    Purge use of PRIVATE and XI_PRIVATE macros.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 0911f48f93e76cc8b6d6037d8ecbca03367f4c51
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Sep 10 11:07:02 2010 +1000
+
+    Move default_options up in preparation for ABI 12
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 28eeb2bdfebf18500c307f70c3af687e58bed2d0
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Sep 10 11:04:42 2010 +1000
+
+    Remove usage of XI86_POINTER_CAPABLE flag.
+    
+    Flag was write-only for a number of server generations already.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 8f26efea050627e4544ed3d92c6e63014eb679eb
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Sep 10 11:03:17 2010 +1000
+
+    Replace LocalDevicePtr with InputInfoPtr
+    
+    LocalDevicePtr was removed with input ABI 12, but InputInfoPtr has been
+    around for years anyway.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 9952bd4c6f0bdc15acf3ca7c83e8eae61f4fcdc1
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 2 10:41:17 2010 +1000
+
+    Bump to 1.3.99
+
+commit bdb217fe5a83c19f4ee85764f2f6a9edaaffbbc6
+Author: Jesse Adkins <jesserayadkins@gmail.com>
+Date:   Tue Sep 28 13:29:50 2010 -0700
+
+    Purge cvs tags.
+    
+    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d81c7423dd80a67809faa42aa44b381d698ab6f8
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Sep 10 11:00:12 2010 +1000
+
+    Remove libc wrappers for xalloc, xfree, etc.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
 commit 799d13a3ac1f15ebca3625183340379840beb2f3
 Author: Adam Jackson <ajax@redhat.com>
 Date:   Tue Aug 10 10:28:26 2010 -0400
diff --git a/debian/changelog b/debian/changelog
index ef3a57a..55d91da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-input-aiptek (1:1.4.0-1) UNRELEASED; urgency=low
+
+  * New upstream release:
+    - Compatible with xorg-server 1.10 (Closes: #624974).
+
+ -- Cyril Brulebois <kibi@debian.org>  Wed, 04 May 2011 04:21:43 +0200
+
 xserver-xorg-input-aiptek (1:1.3.1-2) unstable; urgency=low
 
   * Switch to dh:

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;
-    }
-


Reply to: