[PATCH 7/8] xfree86: Remove unused refcounting from input drivers

Adam Jackson ajax at redhat.com
Tue Sep 21 16:05:25 PDT 2010


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/common/xf86Helper.c |    5 -----
 hw/xfree86/common/xf86Xinput.h |    1 -
 2 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 90e0c67..0172ace 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -125,7 +125,6 @@ xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags)
 				xnfalloc(sizeof(InputDriverRec));
     *xf86InputDriverList[xf86NumInputDrivers - 1] = *driver;
     xf86InputDriverList[xf86NumInputDrivers - 1]->module = module;
-    xf86InputDriverList[xf86NumInputDrivers - 1]->refCount = 0;
 }
 
 void
@@ -284,7 +283,6 @@ xf86AllocateInput(InputDriverPtr drv, int flags)
 	return NULL;
 
     new->drv = drv;
-    drv->refCount++;
     new->module = DuplicateModule(drv->module, NULL);
 
     for (prev = &xf86InputDevs; *prev; prev = &(*prev)->next)
@@ -320,9 +318,6 @@ xf86DeleteInput(InputInfoPtr pInp, int flags)
     if (pInp->module)
 	UnloadModule(pInp->module);
 
-    if (pInp->drv)
-	pInp->drv->refCount--;
-
     /* This should *really* be handled in drv->UnInit(dev) call instead, but
      * if the driver forgets about it make sure we free it or at least crash
      * with flying colors */
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
index 20a3f1b..7b60cdf 100644
--- a/hw/xfree86/common/xf86Xinput.h
+++ b/hw/xfree86/common/xf86Xinput.h
@@ -103,7 +103,6 @@ typedef struct _InputDriverRec {
 				      struct _LocalDeviceRec *pInfo,
 				      int flags);
     pointer		    module;
-    int			    refCount;
 } InputDriverRec, *InputDriverPtr;
 
 /* This is to input devices what the ScrnInfoRec is to screens. */
-- 
1.7.2.2



More information about the xorg-devel mailing list