st/egl: Move drm_display_authenticate into HAVE_WAYLAND_BACKEND section.
authorVinson Lee <vlee@freedesktop.org>
Sat, 18 Feb 2012 19:16:18 +0000 (11:16 -0800)
committerVinson Lee <vlee@freedesktop.org>
Mon, 20 Feb 2012 21:17:23 +0000 (13:17 -0800)
Fixes this GCC warning.
native_drm.c:153:1: warning: ‘drm_display_authenticate’ defined but not
used [-Wunused-function]

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/state_trackers/egl/drm/native_drm.c

index c013769e57d8b874f905d967dbd3c1e6803a667f..6ac12100f765ac3ec5cdc7e9067703115a786787 100644 (file)
@@ -149,15 +149,6 @@ static struct native_display_buffer drm_display_buffer = {
    drm_display_export_native_buffer
 };
 
-static int
-drm_display_authenticate(void *user_data, uint32_t magic)
-{
-   struct native_display *ndpy = user_data;
-   struct drm_display *drmdpy = drm_display(ndpy);
-
-   return drmAuthMagic(drmdpy->fd, magic);
-}
-
 static char *
 drm_get_device_name(int fd)
 {
@@ -196,6 +187,15 @@ out:
 
 #ifdef HAVE_WAYLAND_BACKEND
 
+static int
+drm_display_authenticate(void *user_data, uint32_t magic)
+{
+   struct native_display *ndpy = user_data;
+   struct drm_display *drmdpy = drm_display(ndpy);
+
+   return drmAuthMagic(drmdpy->fd, magic);
+}
+
 static struct wayland_drm_callbacks wl_drm_callbacks = {
    drm_display_authenticate,
    egl_g3d_wl_drm_helper_reference_buffer,