Signed-off-by: Alan Coopersmith <[email protected]>
---
hw/xfree86/common/xf86sbusBus.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c
index b7bb913..3f1523a 100644
--- a/hw/xfree86/common/xf86sbusBus.c
+++ b/hw/xfree86/common/xf86sbusBus.c
@@ -585,8 +585,9 @@ xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr
psdp)
pScrn->virtualY = psdp->height;
}
-static sbusPaletteKeyIndex;
-static DevPrivateKey sbusPaletteKey = &sbusPaletteKeyIndex;
+static DevPrivateKeyRec sbusPaletteKeyRec;
+#define sbusPaletteKey (&sbusPaletteKeyRec)
+
typedef struct _sbusCmap {
sbusDevicePtr psdp;
CloseScreenProcPtr CloseScreen;
@@ -657,6 +658,9 @@ xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr
psdp)
struct fbcmap fbcmap;
unsigned char data[2];
+ if (!dixRegisterPrivateKey(sbusPaletteKey, PRIVATE_SCREEN, 0))
+ FatalError("Cannot register sbus private key");
+
cmap = xnfcalloc(1, sizeof(sbusCmapRec));
dixSetPrivate(&pScreen->devPrivates, sbusPaletteKey, cmap);
cmap->psdp = psdp;
--
1.7.3.2
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel