summaryrefslogtreecommitdiff
path: root/src/loader/loader.c
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-07-07 15:42:15 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-07-22 16:35:25 +0100
commit1c328b8aa79b0644160082b7e9e02df18ab3ca48 (patch)
tree7e3c057ea39b0065bf0d45eefc767654ef99243c /src/loader/loader.c
parent72c784347bf66b61385cb57bb666033e5234ba69 (diff)
loader: use HAVE_LIBDRM instead of ! __NOT_HAVE_DRM_H
Double negatives in English language are normally avoided, plus the former seems cleaner and more consistent. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/loader/loader.c')
-rw-r--r--src/loader/loader.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 8da1858734..8634f45e78 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -85,7 +85,7 @@
#endif
#include "loader.h"
-#ifndef __NOT_HAVE_DRM_H
+#ifdef HAVE_LIBDRM
#include <xf86drm.h>
#endif
@@ -505,7 +505,7 @@ sysfs_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
}
#endif
-#if !defined(__NOT_HAVE_DRM_H)
+#if defined(HAVE_LIBDRM)
/* for i915 */
#include <i915_drm.h>
/* for radeon */
@@ -588,7 +588,7 @@ loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
if (sysfs_get_pci_id_for_fd(fd, vendor_id, chip_id))
return 1;
#endif
-#if !defined(__NOT_HAVE_DRM_H)
+#if HAVE_LIBDRM
if (drm_get_pci_id_for_fd(fd, vendor_id, chip_id))
return 1;
#endif
@@ -699,7 +699,7 @@ loader_get_driver_for_fd(int fd, unsigned driver_types)
if (!loader_get_pci_id_for_fd(fd, &vendor_id, &chip_id)) {
-#ifndef __NOT_HAVE_DRM_H
+#if HAVE_LIBDRM
/* fallback to drmGetVersion(): */
drmVersionPtr version = drmGetVersion(fd);