[PATCH 3/8] kdrive: Remove dead generic XV adaptors code.
Eric Anholt
eric at anholt.net
Mon May 5 13:09:08 PDT 2014
I couldn't find any callers in the history of the tree.
Signed-off-by: Eric Anholt <eric at anholt.net>
---
hw/kdrive/ephyr/ephyrvideo.c | 6 +-----
hw/kdrive/src/kxv.c | 43 -------------------------------------------
hw/kdrive/src/kxv.h | 9 ---------
3 files changed, 1 insertion(+), 57 deletions(-)
diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c
index 160c965..4c9d13a 100644
--- a/hw/kdrive/ephyr/ephyrvideo.c
+++ b/hw/kdrive/ephyr/ephyrvideo.c
@@ -612,8 +612,6 @@ ephyrXVPrivSetAdaptorsHooks(EphyrXVPriv * a_this)
static Bool
ephyrXVPrivRegisterAdaptors(EphyrXVPriv * a_this, ScreenPtr a_screen)
{
- KdScreenPriv(a_screen);
- KdScreenInfo *screen = pScreenPriv->screen;
Bool is_ok = FALSE;
KdVideoAdaptorPtr *adaptors = NULL, *registered_adaptors = NULL;
int num_registered_adaptors = 0, i = 0, num_adaptors = 0;
@@ -624,10 +622,8 @@ ephyrXVPrivRegisterAdaptors(EphyrXVPriv * a_this, ScreenPtr a_screen)
if (!a_this->num_adaptors)
goto out;
- num_registered_adaptors =
- KdXVListGenericAdaptors(screen, ®istered_adaptors);
- num_adaptors = num_registered_adaptors + a_this->num_adaptors;
+ num_adaptors = a_this->num_adaptors;
adaptors = calloc(num_adaptors, sizeof(KdVideoAdaptorPtr));
if (!adaptors) {
EPHYR_LOG_ERROR("failed to allocate adaptors tab\n");
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index 5085770..d1c4530 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -116,49 +116,6 @@ static unsigned long PortResource = 0;
#define GET_KDXV_WINDOW(pWin) ((KdXVWindowPtr) \
dixLookupPrivate(&(pWin)->devPrivates, KdXVWindowKey))
-static KdXVInitGenericAdaptorPtr *GenDrivers = NULL;
-static int NumGenDrivers = 0;
-
-int
-KdXVRegisterGenericAdaptorDriver(KdXVInitGenericAdaptorPtr InitFunc)
-{
- KdXVInitGenericAdaptorPtr *newdrivers;
-
-/* fprintf(stderr,"KdXVRegisterGenericAdaptorDriver\n"); */
-
- newdrivers = realloc(GenDrivers, sizeof(KdXVInitGenericAdaptorPtr) *
- (1 + NumGenDrivers));
- if (!newdrivers)
- return 0;
- GenDrivers = newdrivers;
-
- GenDrivers[NumGenDrivers++] = InitFunc;
-
- return 1;
-}
-
-int
-KdXVListGenericAdaptors(KdScreenInfo * screen, KdVideoAdaptorPtr ** adaptors)
-{
- int i, j, n, num;
- KdVideoAdaptorPtr *DrivAdap, *new;
-
- num = 0;
- *adaptors = NULL;
- for (i = 0; i < NumGenDrivers; i++) {
- n = GenDrivers[i] (screen, &DrivAdap);
- if (0 == n)
- continue;
- new = realloc(*adaptors, sizeof(KdVideoAdaptorPtr) * (num + n));
- if (NULL == new)
- continue;
- *adaptors = new;
- for (j = 0; j < n; j++, num++)
- (*adaptors)[num] = DrivAdap[j];
- }
- return num;
-}
-
KdVideoAdaptorPtr
KdXVAllocateVideoAdaptorRec(KdScreenInfo * screen)
{
diff --git a/hw/kdrive/src/kxv.h b/hw/kdrive/src/kxv.h
index f479de1..13efcbd 100644
--- a/hw/kdrive/src/kxv.h
+++ b/hw/kdrive/src/kxv.h
@@ -159,15 +159,6 @@ typedef struct {
Bool
KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr * Adaptors, int num);
-typedef int (*KdXVInitGenericAdaptorPtr) (KdScreenInfo * screen,
- KdVideoAdaptorPtr ** Adaptors);
-
-int
- KdXVRegisterGenericAdaptorDriver(KdXVInitGenericAdaptorPtr InitFunc);
-
-int
- KdXVListGenericAdaptors(KdScreenInfo * screen, KdVideoAdaptorPtr ** Adaptors);
-
void
KdXVCopyPackedData(KdScreenInfo * screen, CARD8 *src, CARD8 *dst, int randr,
--
1.9.2
More information about the xorg-devel
mailing list