[PATCH 1/4] Convert sbusPaletteKey to latest DevPrivate API
Alan Coopersmith
alan.coopersmith at oracle.com
Mon May 14 11:19:08 PDT 2012
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
Already being used in the Xorg 1.12 packages for Solaris, since we can't
build on SPARC without it.
hw/xfree86/common/xf86sbusBus.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c
index c993b60..27d24f8 100644
--- a/hw/xfree86/common/xf86sbusBus.c
+++ b/hw/xfree86/common/xf86sbusBus.c
@@ -619,8 +619,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;
@@ -692,6 +693,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.9.2
More information about the xorg-devel
mailing list