summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/leo.h6
-rw-r--r--src/leo_accel.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/leo.h b/src/leo.h
index eec21ba..46955a6 100644
--- a/src/leo.h
+++ b/src/leo.h
@@ -86,13 +86,13 @@ typedef struct {
#define GET_LEO_FROM_SCRN(p) ((LeoPtr)((p)->driverPrivate))
+extern int LeoGCPrivateIndex;
+
#define LEO_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
#if LEO_OLDPRIV
-extern int LeoGCPrivateIndex;
#define LeoGetGCPrivate(g) (g)->devPrivates[LeoGCPrivateIndex].ptr
#else
-extern DevPrivateKey LeoGCPrivateKey;
-#define LeoGetGCPrivate(g) dixLookupPrivate(&(g)->devPrivates, LeoGCPrivateKey)
+#define LeoGetGCPrivate(g) dixLookupPrivate(&(g)->devPrivates, &LeoGCPrivateIndex)
#endif
extern int leoRopTable[];
diff --git a/src/leo_accel.c b/src/leo_accel.c
index 4408b24..9bfbc4a 100644
--- a/src/leo_accel.c
+++ b/src/leo_accel.c
@@ -42,11 +42,7 @@
#include "leo.h"
-#if LEO_OLDPRIV
int LeoGCPrivateIndex;
-#else
-DevPrivateKey LeoGCPrivateKey = &LeoGCPrivateKey;
-#endif
int leoRopTable[16] = {
LEO_ATTR_RGBE_ENABLE|LEO_ROP_ZERO, /* GXclear */
@@ -110,7 +106,7 @@ Bool LeoAccelInit (ScreenPtr pScreen, LeoPtr pLeo)
if (!AllocateGCPrivate(pScreen, LeoGCPrivateIndex, sizeof(LeoPrivGCRec)))
return FALSE;
#else
- if (!dixRequestPrivate(LeoGCPrivateKey, sizeof(LeoPrivGCRec)))
+ if (!dixRequestPrivate(&LeoGCPrivateIndex, sizeof(LeoPrivGCRec)))
return FALSE;
#endif