All DBG macros call this function, there's no need to have it inside the
macro, we might as well leverage __VA_ARGS__.

Signed-off-by: Peter Hutterer <[email protected]>
---
 src/wcmCommon.c      |  121 +++++++++++++++++++++++++-------------------------
 src/wcmConfig.c      |    6 +-
 src/wcmFilter.c      |    4 +-
 src/wcmISDV4.c       |   24 +++++-----
 src/wcmTouchFilter.c |    6 +-
 src/wcmUSB.c         |   54 +++++++++++-----------
 src/wcmXCommand.c    |   24 +++++-----
 src/xf86Wacom.c      |   84 +++++++++++++++++-----------------
 src/xf86Wacom.h      |    6 ++-
 9 files changed, 166 insertions(+), 163 deletions(-)

diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index b3393b0..128467f 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -57,7 +57,7 @@ void xf86WcmMappingFactor(LocalDevicePtr local)
 {
        WacomDevicePtr priv = (WacomDevicePtr) local->private;
  
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmMappingFactor \n"));
+       DBG(10, priv->debugLevel, "xf86WcmMappingFactor \n");
 
        xf86WcmVirtualTabletSize(local);
        
@@ -81,16 +81,16 @@ void xf86WcmMappingFactor(LocalDevicePtr local)
        if (priv->currentScreen == -1) /* tool on the tablet */
                priv->currentScreen = 0;
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmMappingFactor"
+       DBG(10, priv->debugLevel, "xf86WcmMappingFactor"
                " Active tablet area x=%d y=%d (virtual tablet area x=%d y=%d) 
map"
                " to maxWidth =%d maxHeight =%d\n", 
                priv->bottomX, priv->bottomY, priv->sizeX, priv->sizeY, 
-               priv->maxWidth, priv->maxHeight));
+               priv->maxWidth, priv->maxHeight);
 
        priv->factorX = (double)priv->maxWidth / (double)priv->sizeX;
        priv->factorY = (double)priv->maxHeight / (double)priv->sizeY;
-       DBG(2, priv->debugLevel, xf86Msg(X_INFO, "X factor = %.3g, Y factor = 
%.3g\n",
-               priv->factorX, priv->factorY));
+       DBG(2, priv->debugLevel, "X factor = %.3g, Y factor = %.3g\n",
+               priv->factorX, priv->factorY);
 }
 
 /*****************************************************************************
@@ -106,8 +106,8 @@ static void xf86WcmSetScreen(LocalDevicePtr local, int v0, 
int v1)
        WacomDevicePtr priv = (WacomDevicePtr) local->private;
        int screenToSet = -1, i, j, x, y, tabletSize = 0;
 
-       DBG(6, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmSetScreen v0=%d v1=%d "
-               "currentScreen=%d\n", v0, v1, priv->currentScreen));
+       DBG(6, priv->debugLevel, "xf86WcmSetScreen v0=%d v1=%d "
+               "currentScreen=%d\n", v0, v1, priv->currentScreen);
 
        if (priv->screen_no != -1 && priv->screen_no >= priv->numScreen)
        {
@@ -152,8 +152,8 @@ static void xf86WcmSetScreen(LocalDevicePtr local, int v0, 
int v1)
                        if (v0 > priv->topY && v0 <= priv->topY + 
priv->tvoffsetY)
                                priv->currentScreen = 1;
                }
-               DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmSetScreen 
TwinView setup screenToSet=%d\n",
-                       priv->currentScreen));
+               DBG(10, priv->debugLevel, "xf86WcmSetScreen TwinView setup 
screenToSet=%d\n",
+                       priv->currentScreen);
        }
 
        xf86WcmMappingFactor(local);
@@ -194,9 +194,9 @@ static void xf86WcmSetScreen(LocalDevicePtr local, int v0, 
int v1)
 
        if (screenToSet == -1)
        {
-               DBG(3, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmSetScreen 
Error: "
+               DBG(3, priv->debugLevel, "xf86WcmSetScreen Error: "
                        "Can not find valid screen (currentScreen=%d)\n",
-                       priv->currentScreen));
+                       priv->currentScreen);
                return;
        }
 
@@ -210,8 +210,8 @@ static void xf86WcmSetScreen(LocalDevicePtr local, int v0, 
int v1)
                y = screenInfo.screens[screenToSet]->height - 1;
 
        xf86XInputSetScreen(local, screenToSet, x, y);
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmSetScreen current=%d 
ToSet=%d\n",
-                       priv->currentScreen, screenToSet));
+       DBG(10, priv->debugLevel, "xf86WcmSetScreen current=%d ToSet=%d\n",
+                       priv->currentScreen, screenToSet);
        priv->currentScreen = screenToSet;
 }
 
@@ -227,8 +227,8 @@ static void xf86WcmSendButtons(LocalDevicePtr local, int 
buttons, int rx, int ry
        int button, mask;
        WacomDevicePtr priv = (WacomDevicePtr) local->private;
        WacomCommonPtr common = priv->common;
-       DBG(6, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmSendButtons "
-               "buttons=%d for %s\n", buttons, local->name));
+       DBG(6, priv->debugLevel, "xf86WcmSendButtons "
+               "buttons=%d for %s\n", buttons, local->name);
 
        /* Tablet PC buttons only apply to penabled devices */
        if (common->wcmTPCButton && (priv->flags & STYLUS_ID))
@@ -461,12 +461,11 @@ static void sendAButton(LocalDevicePtr local, int button, 
int mask,
        if (!priv->button[button])  /* ignore this button event */
                return;
 
-       DBG(4, priv->debugLevel, xf86Msg(X_INFO,
-               "sendAButton TPCButton(%s) button=%d state=%d " 
+       DBG(4, priv->debugLevel, "sendAButton TPCButton(%s) button=%d state=%d 
" 
                "code=%08x, for %s coreEvent=%s \n", 
                common->wcmTPCButton ? "on" : "off", 
                button, mask, priv->button[button], 
-               local->name, (priv->button[button] & AC_CORE) ? "yes" : "no"));
+               local->name, (priv->button[button] & AC_CORE) ? "yes" : "no");
 
        if (!priv->keys[button][0])
        {
@@ -579,7 +578,7 @@ static void sendWheelStripEvents(LocalDevicePtr local, 
const WacomDeviceState* d
        unsigned  *keyP = 0;
        int is_absolute = priv->flags & ABSOLUTE_FLAG;
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "sendWheelStripEvents for %s 
\n", local->name));
+       DBG(10, priv->debugLevel, "sendWheelStripEvents for %s \n", 
local->name);
 
        /* emulate events for relative wheel */
        if ( ds->relwheel )
@@ -669,9 +668,9 @@ static void sendWheelStripEvents(LocalDevicePtr local, 
const WacomDeviceState* d
 
        if (!fakeButton) return;
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "sendWheelStripEvents "
+       DBG(10, priv->debugLevel, "sendWheelStripEvents "
                "send fakeButton %x with value = %d \n", 
-               fakeButton, value));
+               fakeButton, value);
 
        switch (fakeButton & AC_TYPE)
        {
@@ -748,9 +747,9 @@ void xf86WcmSendEvents(LocalDevicePtr local, const 
WacomDeviceState* ds)
 
        if (priv->serial && serial != priv->serial)
        {
-               DBG(10, priv->debugLevel, xf86Msg(X_INFO, "[%s] serial number"
+               DBG(10, priv->debugLevel, "[%s] serial number"
                        " is %u but your system configured %u", 
-                       local->name, serial, (int)priv->serial));
+                       local->name, serial, (int)priv->serial);
                return;
        }
 
@@ -768,7 +767,7 @@ void xf86WcmSendEvents(LocalDevicePtr local, const 
WacomDeviceState* ds)
                ty = ds->stripy;
        }
 
-       DBG(7, priv->debugLevel, xf86Msg(X_INFO, "[%s] o_prox=%s x=%d y=%d z=%d 
"
+       DBG(7, priv->debugLevel, "[%s] o_prox=%s x=%d y=%d z=%d "
                "b=%s b=%d tx=%d ty=%d wl=%d rot=%d th=%d\n",
                (type == STYLUS_ID) ? "stylus" :
                        (type == CURSOR_ID) ? "cursor" : 
@@ -776,7 +775,7 @@ void xf86WcmSendEvents(LocalDevicePtr local, const 
WacomDeviceState* ds)
                        (type == TOUCH_ID) ? "touch" : "pad",
                priv->oldProximity ? "true" : "false",
                x, y, z, is_button ? "true" : "false", buttons,
-               tx, ty, wheel, rot, throttle));
+               tx, ty, wheel, rot, throttle);
 
        /* rotation mixes x and y up a bit */
        if (common->wcmRotate == ROTATE_CW)
@@ -823,14 +822,14 @@ void xf86WcmSendEvents(LocalDevicePtr local, const 
WacomDeviceState* ds)
        }
        v5 = wheel;
 
-       DBG(6, priv->debugLevel, xf86Msg(X_INFO, "[%s] %s prox=%d\tx=%d"
+       DBG(6, priv->debugLevel, "[%s] %s prox=%d\tx=%d"
                "\ty=%d\tz=%d\tv3=%d\tv4=%d\tv5=%d\tid=%d"
                "\tserial=%u\tbutton=%s\tbuttons=%d\n",
                local->name,
                is_absolute ? "abs" : "rel",
                is_proximity,
                x, y, z, v3, v4, v5, id, serial,
-               is_button ? "true" : "false", buttons));
+               is_button ? "true" : "false", buttons);
 
        priv->currentX = x;
        priv->currentY = y;
@@ -1069,8 +1068,8 @@ static int xf86WcmSuppress(WacomCommonPtr common, const 
WacomDeviceState* dsOrig
                dsNew->y = dsOrig->y;
        }
 
-       DBG(10, common->debugLevel, xf86Msg(X_INFO, "xf86WcmSuppress at level = 
%d"
-               " return value = %d\n", suppress, returnV));
+       DBG(10, common->debugLevel, "xf86WcmSuppress at level = %d"
+               " return value = %d\n", suppress, returnV);
        return returnV;
 }
 
@@ -1104,7 +1103,7 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel,
        pChannel = common->wcmChannel + channel;
        pLast = &pChannel->valid.state;
 
-       DBG(10, common->debugLevel, xf86Msg(X_INFO, "wcmEvent at channel = 
%d\n", channel));
+       DBG(10, common->debugLevel, "wcmEvent at channel = %d\n", channel);
 
        /* sanity check the channel */
        if (channel >= MAX_CHANNELS)
@@ -1116,7 +1115,7 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel,
 
        /* timestamp the state for velocity and acceleration analysis */
        ds.sample = (int)GetTimeInMillis();
-       DBG(10, common->debugLevel, xf86Msg(X_INFO, "wcmEvent: "
+       DBG(10, common->debugLevel, "wcmEvent: "
                "c=%d i=%d t=%d s=%u x=%d y=%d b=%d "
                "p=%d rz=%d tx=%d ty=%d aw=%d rw=%d "
                "t=%d df=%d px=%d st=%d cs=%d \n",
@@ -1128,15 +1127,15 @@ void wcmEvent(WacomCommonPtr common, unsigned int 
channel,
                ds.pressure, ds.rotation, ds.tiltx,
                ds.tilty, ds.abswheel, ds.relwheel, ds.throttle,
                ds.discard_first, ds.proximity, ds.sample,
-               pChannel->nSamples));
+               pChannel->nSamples);
 
        /* Discard the first 2 USB packages due to events delay */
        if ( (pChannel->nSamples < 2) && (common->wcmDevCls == 
&gWacomUSBDevice) && 
                ds.device_type != PAD_ID && (ds.device_type != TOUCH_ID) )
        {
-               DBG(11, common->debugLevel, 
-                       xf86Msg(X_INFO, "discarded %dth USB data.\n",
-                       pChannel->nSamples));
+               DBG(11, common->debugLevel,
+                       "discarded %dth USB data.\n",
+                       pChannel->nSamples);
                ++pChannel->nSamples;
                return; /* discard */
        }
@@ -1150,7 +1149,7 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel,
        fs = &pChannel->rawFilter;
        if (!fs->npoints && ds.proximity)
        {
-               DBG(11, common->debugLevel, xf86Msg(X_INFO, "initialize Channel 
data.\n"));
+               DBG(11, common->debugLevel, "initialize Channel data.\n");
                /* store channel device state for later use */
                for (i=common->wcmRawSample - 1; i>=0; i--)
                {
@@ -1183,8 +1182,8 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel,
                {
                        if (common->wcmModel->FilterRaw(common,pChannel,&ds))
                        {
-                               DBG(10, common->debugLevel, xf86Msg(X_INFO,
-                                       "Raw filtering discarded data.\n"));
+                               DBG(10, common->debugLevel,
+                                       "Raw filtering discarded data.\n");
                                resetSampleCounter(pChannel);
                                return; /* discard */
                        }
@@ -1338,7 +1337,7 @@ static void commonDispatchDevice(WacomCommonPtr common, 
unsigned int channel,
                                }
        }
 
-       DBG(10, common->debugLevel, xf86Msg(X_INFO, "commonDispatchDevice 
device type = %d\n", ds->device_type));
+       DBG(10, common->debugLevel, "commonDispatchDevice device type = %d\n", 
ds->device_type);
        /* Find the device the current events are meant for */
        /* 1: Find the tool (the one with correct serial or in second
         * hand, the one with serial set to 0 if no match with the
@@ -1401,8 +1400,8 @@ static void commonDispatchDevice(WacomCommonPtr common, 
unsigned int channel,
                                LocalDevicePtr oDev = outprox->device;
                                WacomDeviceState out = { 0 };
                                out.device_type = 
DEVICE_ID(((WacomDevicePtr)(oDev->private))->flags);
-                               DBG(2, common->debugLevel, xf86Msg(X_INFO, 
"Soft prox-out for %s\n",
-                                       outprox->device->name));
+                               DBG(2, common->debugLevel, "Soft prox-out for 
%s\n",
+                                       outprox->device->name);
                                xf86WcmSendEvents(oDev, &out);
                        }
                        else
@@ -1413,8 +1412,8 @@ static void commonDispatchDevice(WacomCommonPtr common, 
unsigned int channel,
                if(tool->current)
                {
                        pDev = tool->current->device;
-                       DBG(11, common->debugLevel, xf86Msg(X_INFO, "tool id=%d 
for %s\n",
-                                      ds->device_type, pDev->name));
+                       DBG(11, common->debugLevel, "tool id=%d for %s\n",
+                                      ds->device_type, pDev->name);
                }
        }
        /* X: InputDevice selection done! */
@@ -1471,9 +1470,9 @@ static void commonDispatchDevice(WacomCommonPtr common, 
unsigned int channel,
                                                /* Send soft prox-out for touch 
first */
                                                WacomDeviceState out = { 0 };
                                                out.device_type = 
DEVICE_ID(temppriv->flags);
-                                               DBG(2, common->debugLevel, 
xf86Msg(X_INFO,
+                                               DBG(2, common->debugLevel,
                                                        "Send soft prox-out for 
%s first\n",
-                                                       localDevices->name));
+                                                       localDevices->name);
                                                xf86WcmSendEvents(localDevices, 
&out);
                                        }
                                }
@@ -1544,8 +1543,7 @@ static void commonDispatchDevice(WacomCommonPtr common, 
unsigned int channel,
                                }
                                else /* no other events to send */
                                {
-                                       DBG(10, common->debugLevel, 
xf86Msg(X_INFO,
-                                               "Ignore non-movement relative 
data \n"));
+                                       DBG(10, common->debugLevel, "Ignore 
non-movement relative data \n");
                                        return;
                                }
                        }
@@ -1574,13 +1572,13 @@ static void commonDispatchDevice(WacomCommonPtr common, 
unsigned int channel,
                                if (common->wcmMaxCursorDist < 
filtered.distance)
                                        common->wcmMaxCursorDist = 
filtered.distance;
                        }
-                       DBG(10, common->debugLevel, xf86Msg(X_INFO, "Distance 
over"
+                       DBG(10, common->debugLevel, "Distance over"
                                " the tablet: %d, ProxoutDist: %d current"
                                " min/max %d hard prox: %d\n",
                                filtered.distance, 
                                common->wcmCursorProxoutDist, 
                                common->wcmMaxCursorDist, 
-                               ds->proximity));
+                               ds->proximity);
 
                        if (priv->oldProximity)
                        {
@@ -1608,9 +1606,9 @@ static void commonDispatchDevice(WacomCommonPtr common, 
unsigned int channel,
        /* otherwise, if no device matched... */
        else
        {
-               DBG(11, common->debugLevel, xf86Msg(X_INFO, "no device matches 
with"
+               DBG(11, common->debugLevel, "no device matches with"
                                " id=%d, serial=%u\n",
-                               ds->device_type, ds->serial_num));
+                               ds->device_type, ds->serial_num);
        }
 }
 
@@ -1806,13 +1804,13 @@ static void xf86WcmInitialTVScreens(LocalDevicePtr 
local)
                priv->screenBottomY[1] = priv->tvResolution[1];
        }
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmInitialTVScreens for 
\"%s\" "
+       DBG(10, priv->debugLevel, "xf86WcmInitialTVScreens for \"%s\" "
                "topX0=%d topY0=%d bottomX0=%d bottomY0=%d "
                "topX1=%d topY1=%d bottomX1=%d bottomY1=%d \n",
                local->name, priv->screenTopX[0], priv->screenTopY[0],
                priv->screenBottomX[0], priv->screenBottomY[0],
                priv->screenTopX[1], priv->screenTopY[1],
-               priv->screenBottomX[1], priv->screenBottomY[1]));
+               priv->screenBottomX[1], priv->screenBottomY[1]);
 }
 
 /*****************************************************************************
@@ -1824,8 +1822,8 @@ void xf86WcmInitialScreens(LocalDevicePtr local)
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
        int i;
 
-       DBG(2, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmInitialScreens for 
\"%s\" "
-               "number of screen=%d \n", local->name, screenInfo.numScreens));
+       DBG(2, priv->debugLevel, "xf86WcmInitialScreens for \"%s\" "
+               "number of screen=%d \n", local->name, screenInfo.numScreens);
        priv->tvoffsetX = 0;
        priv->tvoffsetY = 0;
        if (priv->twinview != TV_NONE)
@@ -1849,18 +1847,19 @@ void xf86WcmInitialScreens(LocalDevicePtr local)
                        priv->screenBottomX[i] = dixScreenOrigins[i].x;
                        priv->screenBottomY[i] = dixScreenOrigins[i].y;
 
-                       DBG(10, priv->debugLevel, xf86Msg(X_INFO, 
"xf86WcmInitialScreens from dix for \"%s\" "
+                       DBG(10, priv->debugLevel, "xf86WcmInitialScreens from 
dix for \"%s\" "
                                "ScreenOrigins[%d].x=%d ScreenOrigins[%d].y=%d 
\n",
-                               local->name, i, priv->screenTopX[i], i, 
priv->screenTopY[i]));
+                               local->name, i, priv->screenTopX[i], i,
+                               priv->screenTopY[i]);
                }
 
                priv->screenBottomX[i] += screenInfo.screens[i]->width;
                priv->screenBottomY[i] += screenInfo.screens[i]->height;
 
-               DBG(10, priv->debugLevel, xf86Msg(X_INFO, 
"xf86WcmInitialScreens for \"%s\" "
+               DBG(10, priv->debugLevel, "xf86WcmInitialScreens for \"%s\" "
                        "topX[%d]=%d topY[%d]=%d bottomX[%d]=%d bottomY[%d]=%d 
\n",
                        local->name, i, priv->screenTopX[i], i, 
priv->screenTopY[i],
-                       i, priv->screenBottomX[i], i, priv->screenBottomY[i]));
+                       i, priv->screenBottomX[i], i, priv->screenBottomY[i]);
        }
 }
 
@@ -1874,7 +1873,7 @@ static void rotateOneTool(WacomDevicePtr priv)
        WacomToolAreaPtr area = priv->toolarea;
        int tmpTopX, tmpTopY, tmpBottomX, tmpBottomY, oldMaxX, oldMaxY;
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "rotateOneTool for \"%s\" 
\n", priv->local->name));
+       DBG(10, priv->debugLevel, "rotateOneTool for \"%s\" \n", 
priv->local->name);
 
        if (!IsTouch(priv))
        {
@@ -1951,7 +1950,7 @@ void xf86WcmRotateTablet(LocalDevicePtr local, int value)
        int oldRotation;
        int tmpTopX, tmpTopY, tmpBottomX, tmpBottomY, oldMaxX, oldMaxY;
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmRotateTablet for 
\"%s\" \n", local->name));
+       DBG(10, priv->debugLevel, "xf86WcmRotateTablet for \"%s\" \n", 
local->name);
 
        if (common->wcmRotate == value) /* initialization */
        {
diff --git a/src/wcmConfig.c b/src/wcmConfig.c
index 8ad58c1..3d8cd03 100644
--- a/src/wcmConfig.c
+++ b/src/wcmConfig.c
@@ -229,7 +229,7 @@ static void xf86WcmUninit(InputDriverPtr drv, 
LocalDevicePtr local, int flags)
        WacomDevicePtr dev;
        WacomDevicePtr *prev;
 
-       DBG(1, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmUninit\n"));
+       DBG(1, priv->debugLevel, "xf86WcmUninit\n");
 
        if (priv->isParent)
        {
@@ -289,9 +289,9 @@ static Bool xf86WcmMatchDevice(LocalDevicePtr pMatch, 
LocalDevicePtr pLocal)
                strstr(pMatch->drv->driverName, "wacom") &&
                !strcmp(privMatch->common->wcmDevice, common->wcmDevice))
        {
-               DBG(2, priv->debugLevel, xf86Msg(X_INFO,
+               DBG(2, priv->debugLevel,
                        "xf86WcmInit wacom port share between"
-                       " %s and %s\n", pLocal->name, pMatch->name));
+                       " %s and %s\n", pLocal->name, pMatch->name);
                type = xf86FindOptionValue(pMatch->options, "Type");
                if ( type && (strstr(type, "eraser")) )
                        privMatch->common->wcmEraserID=pMatch->name;
diff --git a/src/wcmFilter.c b/src/wcmFilter.c
index 2c20ae4..748f699 100644
--- a/src/wcmFilter.c
+++ b/src/wcmFilter.c
@@ -248,8 +248,8 @@ int wcmFilterCoord(WacomCommonPtr common, WacomChannelPtr 
pChannel,
        WacomDeviceState *pLast;
        int *x, *y, i; 
 
-       DBG(10, common->debugLevel, xf86Msg(X_INFO, "wcmFilterCoord with "
-                       "common->wcmRawSample = %d \n", common->wcmRawSample));
+       DBG(10, common->debugLevel, "wcmFilterCoord with "
+                       "common->wcmRawSample = %d \n", common->wcmRawSample);
        x = pChannel->rawFilter.x;
        y = pChannel->rawFilter.y;
 
diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c
index c52299a..d7e26ae 100644
--- a/src/wcmISDV4.c
+++ b/src/wcmISDV4.c
@@ -123,7 +123,7 @@ static Bool isdv4Init(LocalDevicePtr local, char* id, float 
*version)
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
        WacomCommonPtr common = priv->common;
 
-       DBG(1, priv->debugLevel, xf86Msg(X_INFO, "initializing ISDV4 
tablet\n"));
+       DBG(1, priv->debugLevel, "initializing ISDV4 tablet\n");
 
        /* Initial baudrate is 38400 */
        if (xf86SetSerialSpeed(local->fd, common->wcmISDV4Speed) < 0)
@@ -150,7 +150,7 @@ static int isdv4Query(LocalDevicePtr local, const char* 
query, char* data)
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
        WacomCommonPtr common = priv->common;
 
-       DBG(1, priv->debugLevel, xf86Msg(X_INFO, "Querying ISDV4 tablet\n"));
+       DBG(1, priv->debugLevel, "Querying ISDV4 tablet\n");
 
        /* Send stop command to the tablet */
        err = xf86WriteSerial(local->fd, WC_ISDV4_STOP, strlen(WC_ISDV4_STOP));
@@ -256,7 +256,7 @@ static int isdv4GetRanges(LocalDevicePtr local)
        WacomCommonPtr common = priv->common;
        int ret = Success;
 
-       DBG(2, priv->debugLevel, xf86Msg(X_INFO, "getting ISDV4 Ranges\n"));
+       DBG(2, priv->debugLevel, "getting ISDV4 Ranges\n");
 
        /* Send query command to the tablet */
        ret = isdv4Query(local, WC_ISDV4_QUERY, data);
@@ -281,10 +281,10 @@ static int isdv4GetRanges(LocalDevicePtr local)
                if (!common->wcmMaxX || !common->wcmMaxY)
                        common->tablet_id = 0xE2;
 
-               DBG(2, priv->debugLevel, xf86Msg(X_INFO, "isdv4GetRanges Pen 
speed=%d "
+               DBG(2, priv->debugLevel, "isdv4GetRanges Pen speed=%d "
                        "maxX=%d maxY=%d maxZ=%d resX=%d resY=%d \n",
                        common->wcmISDV4Speed, common->wcmMaxX, common->wcmMaxY,
-                       common->wcmMaxZ, common->wcmResolX, common->wcmResolY));
+                       common->wcmMaxZ, common->wcmResolX, common->wcmResolY);
        }
 
        /* Touch might be supported. Send a touch query command */
@@ -367,11 +367,11 @@ static int isdv4GetRanges(LocalDevicePtr local)
                common->wcmVersion = ( data[10] | (data[9] << 7) );
                ret = Success;
 
-               DBG(2, priv->debugLevel, xf86Msg(X_INFO, "isdv4GetRanges touch 
speed=%d "
+               DBG(2, priv->debugLevel, "isdv4GetRanges touch speed=%d "
                        "maxTouchX=%d maxTouchY=%d TouchresX=%d TouchresY=%d 
\n",
                        common->wcmISDV4Speed, common->wcmMaxTouchX,
                        common->wcmMaxTouchY, common->wcmTouchResolX,
-                       common->wcmTouchResolY));
+                       common->wcmTouchResolY);
        }
        return ret;
 }
@@ -401,7 +401,7 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned 
char* data)
        WacomDeviceState* ds;
        int n, cur_type, channel = 0;
 
-       DBG(10, common->debugLevel, xf86Msg(X_INFO, "isdv4Parse \n"));
+       DBG(10, common->debugLevel, "isdv4Parse \n");
 
        /* determine the type of message (touch or stylus) */
        if (data[0] & 0x10) /* a touch data */
@@ -484,8 +484,8 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned 
char* data)
                        }
                }
 
-               DBG(8, priv->debugLevel, xf86Msg(X_INFO, "isdv4Parse MultiTouch 
"
-                       "%s proximity \n", ds->proximity ? "in" : "out of"));
+               DBG(8, priv->debugLevel, "isdv4Parse MultiTouch "
+                       "%s proximity \n", ds->proximity ? "in" : "out of");
        }
        else
        {
@@ -536,9 +536,9 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned 
char* data)
                        ds->device_id = ERASER_DEVICE_ID;
                }
 
-               DBG(8, priv->debugLevel, xf86Msg(X_INFO, "isdv4Parse %s\n",
+               DBG(8, priv->debugLevel, "isdv4Parse %s\n",
                        ds->device_type == ERASER_ID ? "ERASER " :
-                       ds->device_type == STYLUS_ID ? "STYLUS" : "NONE"));
+                       ds->device_type == STYLUS_ID ? "STYLUS" : "NONE");
        }
        wcmEvent(common, channel, ds);
        return common->wcmPktLength;
diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c
index 3032c0e..be9fd00 100644
--- a/src/wcmTouchFilter.c
+++ b/src/wcmTouchFilter.c
@@ -129,7 +129,7 @@ void xf86WcmFingerTapToClick(WacomCommonPtr common)
                                        secondChannel->valid.states[1] };
        int direction = 0;
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmFingerTapToClick 
\n"));
+       DBG(10, priv->debugLevel, "xf86WcmFingerTapToClick \n");
 
        /* skip initial second finger event */
        if (!dsLast[1].proximity)
@@ -316,7 +316,7 @@ static void xf86WcmFingerScroll(WacomDevicePtr priv)
        int gesture = 0;
        WacomFilterState filterd;  /* borrow this struct */
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmFingerScroll \n"));
+       DBG(10, priv->debugLevel, "xf86WcmFingerScroll \n");
 
        /* initialize the points so we can rotate them */
        filterd.x[0] = ds[0].x;
@@ -391,7 +391,7 @@ static void xf86WcmFingerZoom(WacomDevicePtr priv)
        int dist = touchDistance(common->wcmGestureState[0],
                        common->wcmGestureState[1]);
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmFingerZoom \n"));
+       DBG(10, priv->debugLevel, "xf86WcmFingerZoom \n");
 
        dist = touchDistance(ds[0], ds[1]) - dist;
 
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index 03134e1..2ed329e 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -372,7 +372,7 @@ static Bool usbDetect(LocalDevicePtr local)
 #ifdef DEBUG
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
 
-       DBG(1, priv->debugLevel, xf86Msg(X_INFO, "usbDetect\n"));
+       DBG(1, priv->debugLevel, "usbDetect\n");
 #endif
 
        SYSCALL(err = ioctl(local->fd, EVIOCGVERSION, &version));
@@ -508,7 +508,7 @@ Bool usbWcmInit(LocalDevicePtr local, char* id, float 
*version)
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
        WacomCommonPtr common = priv->common;
 
-       DBG(1, priv->debugLevel, xf86Msg(X_INFO, "initializing USB tablet\n"));
+       DBG(1, priv->debugLevel, "initializing USB tablet\n");
        *version = 0.0;
 
        /* fetch vendor, product, and model name */
@@ -722,7 +722,7 @@ static int usbDetectConfig(LocalDevicePtr local)
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
        WacomCommonPtr common = priv->common;
 
-       DBG(10, common->debugLevel, xf86Msg(X_INFO, "usbDetectConfig \n"));
+       DBG(10, common->debugLevel, "usbDetectConfig \n");
        if (IsPad (priv))
                priv->nbuttons = common->npadkeys;
        else
@@ -813,9 +813,9 @@ static int usbChooseChannel(WacomCommonPtr common, int 
serial)
                                wcmEvent(common, i, 
&common->wcmChannel[i].work);
                        }
                }
-               DBG(1, common->debugLevel, xf86Msg(X_INFO, "usbParse (device 
with serial number: %u)"
+               DBG(1, common->debugLevel, "usbParse (device with serial 
number: %u)"
                        " at %d: Exceeded channel count; ignoring the 
events.\n",
-                       serial, (int)GetTimeInMillis()));
+                       serial, (int)GetTimeInMillis());
        }
        else
                common->wcmLastToolSerial = serial;
@@ -830,7 +830,7 @@ static void usbParseEvent(LocalDevicePtr local,
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
        WacomCommonPtr common = priv->common;
 
-       DBG(10, common->debugLevel, xf86Msg(X_INFO, "usbParseEvent \n"));
+       DBG(10, common->debugLevel, "usbParseEvent \n");
        /* store events until we receive the MSC_SERIAL containing
         * the serial number; without it we cannot determine the
         * correct channel. */
@@ -890,8 +890,8 @@ static void usbParseEvent(LocalDevicePtr local,
        /* ignore events without information */
        if (common->wcmEventCnt <= 2)
        {
-               DBG(3, common->debugLevel, xf86Msg(X_INFO, "%s - usbParse: 
dropping empty event"
-                       " for serial %d\n", local->name, 
common->wcmLastToolSerial));
+               DBG(3, common->debugLevel, "%s - usbParse: dropping empty event"
+                       " for serial %d\n", local->name, 
common->wcmLastToolSerial);
                goto skipEvent;
        }
 
@@ -923,7 +923,7 @@ static void usbParseChannel(LocalDevicePtr local, int 
channel)
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
        WacomCommonPtr common = priv->common;
 
-       DBG(6, common->debugLevel, xf86Msg(X_INFO, "usbParseChannel %d events 
received\n", common->wcmEventCnt));
+       DBG(6, common->debugLevel, "usbParseChannel %d events received\n", 
common->wcmEventCnt);
        #define MOD_BUTTONS(bit, value) do { \
                shift = 1<<bit; \
                ds->buttons = (((value) != 0) ? \
@@ -931,10 +931,10 @@ static void usbParseChannel(LocalDevicePtr local, int 
channel)
                } while (0)
 
        if (common->wcmEventCnt == 1 && !common->wcmEvents->type) {
-               DBG(6, common->debugLevel, xf86Msg(X_INFO, "usbParseChannel no 
real events received\n"));
+               DBG(6, common->debugLevel, "usbParseChannel no real events 
received\n");
                return;
        }
-       DBG(6, common->debugLevel, xf86Msg(X_INFO, "usbParseChannel %d events 
received\n", common->wcmEventCnt));
+       DBG(6, common->debugLevel, "usbParseChannel %d events received\n", 
common->wcmEventCnt);
 
        /* all USB data operates from previous context except relative values*/
        ds = &common->wcmChannel[channel].work;
@@ -945,9 +945,9 @@ static void usbParseChannel(LocalDevicePtr local, int 
channel)
        for (i=0; i<common->wcmEventCnt; ++i)
        {
                event = common->wcmEvents + i;
-               DBG(11, common->debugLevel, xf86Msg(X_INFO, "usbParseChannel "
+               DBG(11, common->debugLevel, "usbParseChannel "
                        "event[%d]->type=%d code=%d value=%d\n",
-                       i, event->type, event->code, event->value));
+                       i, event->type, event->code, event->value);
 
                /* absolute events */
                if (event->type == EV_ABS)
@@ -1002,9 +1002,9 @@ static void usbParseChannel(LocalDevicePtr local, int 
channel)
                                if (common->wcmProtocolLevel == 4)
                                        ds->device_id = STYLUS_DEVICE_ID;
                                ds->proximity = (event->value != 0);
-                               DBG(6, common->debugLevel, xf86Msg(X_INFO,
+                               DBG(6, common->debugLevel,
                                        "USB stylus detected %x\n",
-                                       event->code));
+                                       event->code);
                        }
                        else if (event->code == BTN_TOOL_RUBBER)
                        {
@@ -1015,16 +1015,16 @@ static void usbParseChannel(LocalDevicePtr local, int 
channel)
                                ds->proximity = (event->value != 0);
                                if (ds->proximity)
                                        ds->proximity = ERASER_PROX;
-                               DBG(6, common->debugLevel, xf86Msg(X_INFO,
+                               DBG(6, common->debugLevel, 
                                        "USB eraser detected %x (value=%d)\n",
-                                       event->code, event->value));
+                                       event->code, event->value);
                        }
                        else if ((event->code == BTN_TOOL_MOUSE) ||
                                (event->code == BTN_TOOL_LENS))
                        {
-                               DBG(6, common->debugLevel, xf86Msg(X_INFO,
+                               DBG(6, common->debugLevel, 
                                        "USB mouse detected %x (value=%d)\n",
-                                       event->code, event->value));
+                                       event->code, event->value);
                                ds->device_type = CURSOR_ID;
                                /* V5 tools use ABS_MISC to report device_id */
                                if (common->wcmProtocolLevel == 4)
@@ -1033,9 +1033,9 @@ static void usbParseChannel(LocalDevicePtr local, int 
channel)
                        }
                        else if (event->code == BTN_TOOL_FINGER)
                        {
-                               DBG(6, common->debugLevel, xf86Msg(X_INFO,
+                               DBG(6, common->debugLevel, 
                                        "USB Pad detected %x (value=%d)\n",
-                                       event->code, event->value));
+                                       event->code, event->value);
                                ds->device_type = PAD_ID;
                                ds->device_id = PAD_DEVICE_ID;
                                ds->proximity = (event->value != 0);
@@ -1044,9 +1044,9 @@ static void usbParseChannel(LocalDevicePtr local, int 
channel)
                        {
                                WacomChannelPtr pChannel = common->wcmChannel + 
channel;
                                WacomDeviceState dslast = pChannel->valid.state;
-                               DBG(6, common->debugLevel, xf86Msg(X_INFO,
+                               DBG(6, common->debugLevel, 
                                        "USB Touch detected %x (value=%d)\n",
-                                       event->code, event->value));
+                                       event->code, event->value);
                                ds->device_type = TOUCH_ID;
                                ds->device_id = TOUCH_DEVICE_ID;
                                ds->proximity = event->value;
@@ -1066,9 +1066,9 @@ static void usbParseChannel(LocalDevicePtr local, int 
channel)
                        {
                                WacomChannelPtr pChannel = common->wcmChannel + 
channel;
                                WacomDeviceState dslast = pChannel->valid.state;
-                               DBG(6, common->debugLevel, xf86Msg(X_INFO,
+                               DBG(6, common->debugLevel, 
                                        "USB Touch second finger detected %x 
(value=%d)\n",
-                                       event->code, event->value));
+                                       event->code, event->value);
                                ds->device_type = TOUCH_ID;
                                ds->device_id = TOUCH_DEVICE_ID;
                                ds->proximity = event->value;
@@ -1115,8 +1115,8 @@ static void usbParseChannel(LocalDevicePtr local, int 
channel)
        if (((common->tablet_id == 0xC0) || (common->tablet_id == 0xC2)) && 
                (ds->device_type == ERASER_ID)) 
        {
-               DBG(10, common->debugLevel, xf86Msg(X_INFO, "usbParseChannel "
-                       "DTF 720 doesn't support eraser "));
+               DBG(10, common->debugLevel, "usbParseChannel "
+                       "DTF 720 doesn't support eraser ");
                return;
        }
 
diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index 33ea0c0..c10f9ae 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -50,11 +50,11 @@ int xf86WcmSetPadCoreMode(LocalDevicePtr local)
        /* Pad is always in relative mode when it's a core device.
         * Always in absolute mode when it is not a core device.
         */
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmSetPadCoreMode (%p)"
+       DBG(10, priv->debugLevel, "xf86WcmSetPadCoreMode (%p)"
                " is always in %s mode when it %s core device\n",
                (void *)local->dev, 
                !is_core ? "absolute" : "relative", 
-               is_core ? "is" : "isn't"));
+               is_core ? "is" : "isn't");
        if (is_core)
                priv->flags &= ~ABSOLUTE_FLAG;
        else
@@ -71,8 +71,8 @@ int xf86WcmDevSwitchModeCall(LocalDevicePtr local, int mode)
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
        int is_absolute = priv->flags & ABSOLUTE_FLAG;
 
-       DBG(3, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmSwitchModeCall for %s 
to mode=%d\n",
-               local->name, mode));
+       DBG(3, priv->debugLevel, "xf86WcmSwitchModeCall for %s to mode=%d\n",
+               local->name, mode);
 
        /* Pad is always in relative mode when it's a core device.
         * Always in absolute mode when it is not a core device.
@@ -96,8 +96,8 @@ int xf86WcmDevSwitchModeCall(LocalDevicePtr local, int mode)
        }
        else if ( (mode != Absolute) && (mode != Relative))
        {
-               DBG(10, priv->debugLevel, xf86Msg(X_INFO, 
"xf86WcmSwitchModeCall"
-                       " for %s invalid mode=%d\n", local->name, mode));
+               DBG(10, priv->debugLevel, "xf86WcmSwitchModeCall"
+                       " for %s invalid mode=%d\n", local->name, mode);
                return BadMatch;
        }
 
@@ -114,8 +114,8 @@ int xf86WcmDevSwitchMode(ClientPtr client, DeviceIntPtr 
dev, int mode)
 #ifdef DEBUG
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
 
-       DBG(3, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmSwitchMode dev=%p 
mode=%d\n",
-               (void *)dev, mode));
+       DBG(3, priv->debugLevel, "xf86WcmSwitchMode dev=%p mode=%d\n",
+               (void *)dev, mode);
 #endif
        /* Share this call with sendAButton in wcmCommon.c */
        return xf86WcmDevSwitchModeCall(local, mode);
@@ -211,7 +211,7 @@ void InitWcmDeviceProperties(LocalDevicePtr local)
     WacomCommonPtr common = priv->common;
     int values[WCM_MAX_MOUSE_BUTTONS];
 
-    DBG(10, priv->debugLevel, xf86Msg(X_INFO, "InitWcmDeviceProperties for %s 
\n", local->name));
+    DBG(10, priv->debugLevel, "InitWcmDeviceProperties for %s \n", 
local->name);
 
     values[0] = priv->topX;
     values[1] = priv->topY;
@@ -299,7 +299,7 @@ int xf86WcmSetProperty(DeviceIntPtr dev, Atom property, 
XIPropertyValuePtr prop,
     WacomDevicePtr priv = (WacomDevicePtr) local->private;
     WacomCommonPtr common = priv->common;
 
-    DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmSetProperty for %s \n", 
local->name));
+    DBG(10, priv->debugLevel, "xf86WcmSetProperty for %s \n", local->name);
 
     if (property == prop_tablet_area)
     {
@@ -497,8 +497,8 @@ int xf86WcmSetProperty(DeviceIntPtr dev, Atom property, 
XIPropertyValuePtr prop,
                 {
                     screen = -1;
                     priv->currentScreen = 0;
-                    DBG(10, priv->debugLevel, xf86Msg(X_INFO, 
"xf86WcmSetProperty TwinView sets to "
-                        "TV_NONE: can't change screen_no. \n"));
+                    DBG(10, priv->debugLevel, "xf86WcmSetProperty TwinView 
sets to "
+                        "TV_NONE: can't change screen_no. \n");
                 }
                 xf86WcmChangeScreen(local, screen);
             }
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index 3e5d33b..d91376d 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -148,7 +148,7 @@ static int xf86WcmInitArea(LocalDevicePtr local)
        double screenRatio, tabletRatio;
        int bottomx = common->wcmMaxX, bottomy = common->wcmMaxY;
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmInitArea\n"));
+       DBG(10, priv->debugLevel, "xf86WcmInitArea\n");
 
        if (IsTouch(priv))
        {
@@ -208,8 +208,8 @@ static int xf86WcmInitArea(LocalDevicePtr local)
                tabletRatio = ((double)(bottomx - priv->topX) /
                                (double)(bottomy - priv->topY));
 
-               DBG(2, priv->debugLevel, xf86Msg(X_INFO, "screenRatio = %.3g, "
-                       "tabletRatio = %.3g\n", screenRatio, tabletRatio));
+               DBG(2, priv->debugLevel, "screenRatio = %.3g, "
+                       "tabletRatio = %.3g\n", screenRatio, tabletRatio);
 
                if (screenRatio > tabletRatio)
                {
@@ -296,8 +296,8 @@ void xf86WcmVirtualTabletPadding(LocalDevicePtr local)
                priv->topPadding = (int)((double)(priv->screenTopY[i] * 
priv->topPadding)
                        / ((double)(priv->screenBottomY[i] - 
priv->screenTopY[i])) + 0.5);
        }
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmVirtualTabletPadding 
for \"%s\" "
-               "x=%d y=%d \n", local->name, priv->leftPadding, 
priv->topPadding));
+       DBG(10, priv->debugLevel, "xf86WcmVirtualTabletPadding for \"%s\" "
+               "x=%d y=%d \n", local->name, priv->leftPadding, 
priv->topPadding);
        return;
 }
 
@@ -336,8 +336,8 @@ void xf86WcmVirtualTabletSize(LocalDevicePtr local)
                priv->sizeY += (int)((double)((priv->maxHeight - 
priv->screenBottomY[i])
                        * tabletSize) / ((double)(priv->screenBottomY[i] - 
priv->screenTopY[i])) + 0.5);
        }
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmVirtualTabletSize for 
\"%s\" "
-               "x=%d y=%d \n", local->name, priv->sizeX, priv->sizeY));
+       DBG(10, priv->debugLevel, "xf86WcmVirtualTabletSize for \"%s\" "
+               "x=%d y=%d \n", local->name, priv->sizeX, priv->sizeY);
        return;
 }
 
@@ -656,12 +656,12 @@ static int xf86WcmRegisterX11Devices (LocalDevicePtr 
local)
                                             * This is only a workaround. 
                                             */
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmRegisterX11Devices "
+       DBG(10, priv->debugLevel, "xf86WcmRegisterX11Devices "
                "(%s) %d buttons, %d keys, %d axes\n",
                IsStylus(priv) ? "stylus" :
                IsCursor(priv) ? "cursor" :
                IsPad(priv) ? "pad" : "eraser",
-               nbbuttons, nbkeys, nbaxes));
+               nbbuttons, nbkeys, nbaxes);
 
        for(loop=1; loop<=nbbuttons; loop++)
                butmap[loop] = loop;
@@ -976,7 +976,7 @@ static Bool xf86WcmOpen(LocalDevicePtr local)
        int rc;
        struct serial_struct ser;
 
-       DBG(1, priv->debugLevel, xf86Msg(X_INFO, "opening %s\n", 
common->wcmDevice));
+       DBG(1, priv->debugLevel, "opening %s\n", common->wcmDevice);
 
        local->fd = xf86OpenSerial(local->options);
        if (local->fd < 0)
@@ -1035,7 +1035,7 @@ static int xf86WcmDevOpen(DeviceIntPtr pWcm)
        WacomCommonPtr common = priv->common;
        struct stat st;
 
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevOpen\n"));
+       DBG(10, priv->debugLevel, "xf86WcmDevOpen\n");
 
        /* Device has been open and not autoprobed */
        if (priv->wcmDevOpenCount)
@@ -1052,11 +1052,11 @@ static int xf86WcmDevOpen(DeviceIntPtr pWcm)
                if ((xf86WcmOpen (local) != Success) || (local->fd < 0) ||
                        !common->wcmDevice)
                {
-                       DBG(1, priv->debugLevel, xf86Msg(X_INFO, "Failed to 
open "
-                               "device (fd=%d)\n", local->fd));
+                       DBG(1, priv->debugLevel, "Failed to open "
+                               "device (fd=%d)\n", local->fd);
                        if (local->fd >= 0)
                        {
-                               DBG(1, priv->debugLevel, xf86Msg(X_INFO, 
"Closing device\n"));
+                               DBG(1, priv->debugLevel, "Closing device\n");
                                xf86CloseSerial(local->fd);
                        }
                        local->fd = -1;
@@ -1066,8 +1066,8 @@ static int xf86WcmDevOpen(DeviceIntPtr pWcm)
                if (fstat(local->fd, &st) == -1)
                {
                        /* can not access major/minor */
-                       DBG(1, priv->debugLevel, xf86Msg(X_ERROR, "%s: stat 
failed (%s). "
-                               "cannot check status.\n", local->name, 
strerror(errno)));
+                       DBG(1, priv->debugLevel, "%s: stat failed (%s). "
+                               "cannot check status.\n", local->name, 
strerror(errno));
 
                        /* older systems don't support the required ioctl.
                         * So, we have to let it pass */
@@ -1098,7 +1098,7 @@ static int xf86WcmReady(LocalDevicePtr local)
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
 #endif
        int n = xf86WaitForInput(local->fd, 0);
-       DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmReady for %s with %d 
numbers of data\n", local->name, n));
+       DBG(10, priv->debugLevel, "xf86WcmReady for %s with %d numbers of 
data\n", local->name, n);
 
        if (n >= 0) return n ? 1 : 0;
        xf86Msg(X_ERROR, "%s: select error: %s\n", local->name, 
strerror(errno));
@@ -1130,9 +1130,9 @@ static void xf86WcmDevReadInput(LocalDevicePtr local)
 
        /* report how well we're doing */
        if (loop >= MAX_READ_LOOPS)
-               DBG(1, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevReadInput: 
Can't keep up!!!\n"));
+               DBG(1, priv->debugLevel, "xf86WcmDevReadInput: Can't keep 
up!!!\n");
        else if (loop > 0)
-               DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevReadInput: 
Read (%d)\n",loop));
+               DBG(10, priv->debugLevel, "xf86WcmDevReadInput: Read 
(%d)\n",loop);
 }                                      
 
 void wcmReadPacket(LocalDevicePtr local)
@@ -1142,13 +1142,13 @@ void wcmReadPacket(LocalDevicePtr local)
        int len, pos, cnt, remaining;
        unsigned char * data;
 
-       DBG(10, common->debugLevel, xf86Msg(X_INFO, "wcmReadPacket: device=%s"
-               " fd=%d \n", common->wcmDevice, local->fd));
+       DBG(10, common->debugLevel, "wcmReadPacket: device=%s"
+               " fd=%d \n", common->wcmDevice, local->fd);
 
        remaining = sizeof(common->buffer) - common->bufpos;
 
-       DBG(1, common->debugLevel, xf86Msg(X_INFO, "wcmReadPacket: pos=%d"
-               " remaining=%d\n", common->bufpos, remaining));
+       DBG(1, common->debugLevel, "wcmReadPacket: pos=%d"
+               " remaining=%d\n", common->bufpos, remaining);
 
        /* fill buffer with as much data as we can handle */
        len = xf86ReadSerial(local->fd,
@@ -1171,8 +1171,8 @@ void wcmReadPacket(LocalDevicePtr local)
 
        /* account for new data */
        common->bufpos += len;
-       DBG(10, common->debugLevel, xf86Msg(X_INFO, "wcmReadPacket buffer has 
%d bytes\n",
-               common->bufpos));
+       DBG(10, common->debugLevel, "wcmReadPacket buffer has %d bytes\n",
+               common->bufpos);
 
        pos = 0;
 
@@ -1203,7 +1203,7 @@ void wcmReadPacket(LocalDevicePtr local)
                cnt = common->wcmModel->Parse(local, common->buffer + pos);
                if (cnt <= 0)
                {
-                       DBG(1, common->debugLevel, xf86Msg(X_INFO, "Misbehaving 
parser returned %d\n",cnt));
+                       DBG(1, common->debugLevel, "Misbehaving parser returned 
%d\n",cnt);
                        break;
                }
                pos += cnt;
@@ -1214,7 +1214,7 @@ void wcmReadPacket(LocalDevicePtr local)
                /* if half a packet remains, move it down */
                if (pos < common->bufpos)
                {
-                       DBG(7, common->debugLevel, xf86Msg(X_INFO, "MOVE %d 
bytes\n", common->bufpos - pos));
+                       DBG(7, common->debugLevel, "MOVE %d bytes\n", 
common->bufpos - pos);
                        memmove(common->buffer,common->buffer+pos,
                                common->bufpos-pos);
                        common->bufpos -= pos;
@@ -1232,7 +1232,7 @@ int xf86WcmDevChangeControl(LocalDevicePtr local, 
xDeviceCtl * control)
 {
 #ifdef DEBUG
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
-       DBG(3, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevChangeControl 
called\n"));
+       DBG(3, priv->debugLevel, "xf86WcmDevChangeControl called\n");
 #endif
        return Success;
 }
@@ -1247,7 +1247,7 @@ static void xf86WcmDevControlProc(DeviceIntPtr device, 
PtrCtrl* ctrl)
        LocalDevicePtr local = (LocalDevicePtr)device->public.devicePrivate;
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
 
-       DBG(4, priv->debugLevel, xf86Msg(X_INFO, "Wacom Dev Control Proc 
called\n"));
+       DBG(4, priv->debugLevel, "Wacom Dev Control Proc called\n");
 #endif
        return;
 }
@@ -1261,14 +1261,14 @@ static void xf86WcmDevClose(LocalDevicePtr local)
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
        WacomCommonPtr common = priv->common;
 
-       DBG(4, priv->debugLevel, xf86Msg(X_INFO, "Wacom number of open devices 
= %d\n", common->fd_refs));
+       DBG(4, priv->debugLevel, "Wacom number of open devices = %d\n", 
common->fd_refs);
 
        if (local->fd >= 0)
        {
                local->fd = -1;
                if (!--common->fd_refs)
                {
-                       DBG(1, common->debugLevel, xf86Msg(X_INFO, "Closing 
device; uninitializing.\n"));
+                       DBG(1, common->debugLevel, "Closing device; 
uninitializing.\n");
                        xf86CloseSerial (common->fd);
                }
        }
@@ -1284,7 +1284,7 @@ static int xf86WcmDevProc(DeviceIntPtr pWcm, int what)
        LocalDevicePtr local = (LocalDevicePtr)pWcm->public.devicePrivate;
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
 
-       DBG(2, priv->debugLevel, xf86Msg(X_INFO, "BEGIN xf86WcmProc dev=%p 
priv=%p "
+       DBG(2, priv->debugLevel, "BEGIN xf86WcmProc dev=%p priv=%p "
                        "type=%s(%s) flags=%d fd=%d what=%s\n",
                        (void *)pWcm, (void *)priv,
                        IsStylus(priv) ? "stylus" :
@@ -1294,7 +1294,7 @@ static int xf86WcmDevProc(DeviceIntPtr pWcm, int what)
                        (what == DEVICE_INIT) ? "INIT" :
                        (what == DEVICE_OFF) ? "OFF" :
                        (what == DEVICE_ON) ? "ON" :
-                       (what == DEVICE_CLOSE) ? "CLOSE" : "???"));
+                       (what == DEVICE_CLOSE) ? "CLOSE" : "???");
 
        switch (what)
        {
@@ -1306,7 +1306,7 @@ static int xf86WcmDevProc(DeviceIntPtr pWcm, int what)
                        priv->wcmInitKeyClassCount = 0;
                        if (!xf86WcmDevOpen(pWcm))
                        {
-                               DBG(1, priv->debugLevel, xf86Msg(X_INFO, 
"xf86WcmProc INIT FAILED\n"));
+                               DBG(1, priv->debugLevel, "xf86WcmProc INIT 
FAILED\n");
                                return !Success;
                        }
                        priv->wcmInitKeyClassCount++;
@@ -1316,7 +1316,7 @@ static int xf86WcmDevProc(DeviceIntPtr pWcm, int what)
                case DEVICE_ON:
                        if (!xf86WcmDevOpen(pWcm))
                        {
-                               DBG(1, priv->debugLevel, xf86Msg(X_INFO, 
"xf86WcmProc ON FAILED\n"));
+                               DBG(1, priv->debugLevel, "xf86WcmProc ON 
FAILED\n");
                                return !Success;
                        }
                        priv->wcmDevOpenCount++;
@@ -1341,7 +1341,7 @@ static int xf86WcmDevProc(DeviceIntPtr pWcm, int what)
                        break;
        } /* end switch */
 
-       DBG(2, priv->debugLevel, xf86Msg(X_INFO, "END xf86WcmProc Success \n"));
+       DBG(2, priv->debugLevel, "END xf86WcmProc Success \n");
        return Success;
 }
 
@@ -1356,8 +1356,8 @@ static Bool xf86WcmDevConvert(LocalDevicePtr local, int 
first, int num,
 {
        WacomDevicePtr priv = (WacomDevicePtr) local->private;
     
-       DBG(6, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevConvert v0=%d v1=%d 
on screen %d \n",
-                v0, v1, priv->currentScreen));
+       DBG(6, priv->debugLevel, "xf86WcmDevConvert v0=%d v1=%d on screen %d 
\n",
+                v0, v1, priv->currentScreen);
 
        if (first != 0 || num == 1) 
                return FALSE;
@@ -1392,7 +1392,7 @@ static Bool xf86WcmDevConvert(LocalDevicePtr local, int 
first, int num,
                if (*y < 0) *y = 0;
        
        }
-       DBG(6, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevConvert v0=%d v1=%d 
to x=%d y=%d\n", v0, v1, *x, *y));
+       DBG(6, priv->debugLevel, "xf86WcmDevConvert v0=%d v1=%d to x=%d 
y=%d\n", v0, v1, *x, *y);
        return TRUE;
 }
 
@@ -1409,7 +1409,7 @@ static Bool xf86WcmDevReverseConvert(LocalDevicePtr 
local, int x, int y,
        WacomDevicePtr priv = (WacomDevicePtr) local->private;
        int i = 0;
 
-       DBG(6, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevReverseConvert x=%d 
y=%d \n", x, y));
+       DBG(6, priv->debugLevel, "xf86WcmDevReverseConvert x=%d y=%d \n", x, y);
        priv->currentSX = x;
        priv->currentSY = y;
 
@@ -1430,10 +1430,10 @@ static Bool xf86WcmDevReverseConvert(LocalDevicePtr 
local, int x, int y,
                        priv->devReverseCount = 0;
        }
 
-       DBG(6, priv->debugLevel, xf86Msg(X_INFO, "Wacom converted x=%d y=%d"
+       DBG(6, priv->debugLevel, "Wacom converted x=%d y=%d"
                " to v0=%d v1=%d v2=%d v3=%d v4=%d v5=%d\n", x, y,
                valuators[0], valuators[1], valuators[2], 
-               valuators[3], valuators[4], valuators[5]));
+               valuators[3], valuators[4], valuators[5]);
 
        return TRUE;
 }
diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h
index 66548b5..646ad3a 100644
--- a/src/xf86Wacom.h
+++ b/src/xf86Wacom.h
@@ -74,7 +74,11 @@
 #endif
 
 #if DEBUG
-#define DBG(lvl, dLevel, f) do { if ((lvl) <= dLevel) f; } while (0)
+#define DBG(lvl, dLevel, ...) \
+       do { \
+               if ((lvl) <= dLevel) \
+                       xf86Msg(X_INFO, __VA_ARGS__); \
+       } while (0)
 #else
 #define DBG(lvl, dLevel, f)
 #endif
-- 
1.6.5.2


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to