xf86-video-intel: src/compat-api.h src/sna/sna_driver.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Sep 18 07:38:27 PDT 2013


 src/compat-api.h     |    4 ++++
 src/sna/sna_driver.c |    5 -----
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit afad7dd43d935a4666bff6c2964714209e851221
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Sep 18 15:34:36 2013 +0100

    sna: Pushed dixPrivateKeyRegistered wrapper into compat-api.h
    
    Move the wrapping out of the main code body and hide it with the others
    in our compatability header.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/compat-api.h b/src/compat-api.h
index d80b7fe..8eb46ef 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -150,6 +150,10 @@ static inline void FreePixmap(PixmapPtr pixmap)
 }
 #endif
 
+#if !HAS_DIXREGISTERPRIVATEKEY
+#define dixPrivateKeyRegistered(key__) (*(key__) != 0)
+#endif
+
 #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,902,0)
 #define SourceValidate(d, x, y, w, h, mode) \
 	if ((d)->pScreen->SourceValidate) (d)->pScreen->SourceValidate(d, x, y, w, h, mode)
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 288fcf1..dcfcd67 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -744,13 +744,8 @@ sna_uevent_init(ScrnInfoPtr scrn)
 	/* RandR will be disabled if Xinerama is active, and so generating
 	 * RR hotplug events is then verboten.
 	 */
-#if HAS_DIXREGISTERPRIVATEKEY
 	if (!dixPrivateKeyRegistered(rrPrivKey))
 		return;
-#else
-	if (rrPrivKey == 0)
-		return;
-#endif
 
 	if (!xf86GetOptValBool(sna->Options, OPTION_HOTPLUG, &hotplug))
 		from = X_DEFAULT, hotplug = TRUE;


More information about the xorg-commit mailing list