summaryrefslogtreecommitdiff
path: root/libkms/linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'libkms/linux.c')
-rw-r--r--libkms/linux.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/libkms/linux.c b/libkms/linux.c
index 17e1d588..77a0bbe9 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -103,25 +103,31 @@ linux_from_sysfs(int fd, struct kms_driver **out)
if (ret)
return ret;
+#ifdef HAVE_INTEL
if (!strcmp(name, "intel"))
ret = intel_create(fd, out);
+ else
+#endif
#ifdef HAVE_VMWGFX
- else if (!strcmp(name, "vmwgfx"))
+ if (!strcmp(name, "vmwgfx"))
ret = vmwgfx_create(fd, out);
+ else
#endif
#ifdef HAVE_NOUVEAU
- else if (!strcmp(name, "nouveau"))
+ if (!strcmp(name, "nouveau"))
ret = nouveau_create(fd, out);
+ else
#endif
#ifdef HAVE_RADEON
- else if (!strcmp(name, "radeon"))
+ if (!strcmp(name, "radeon"))
ret = radeon_create(fd, out);
+ else
#endif
#ifdef HAVE_EXYNOS
- else if (!strcmp(name, "exynos"))
+ if (!strcmp(name, "exynos"))
ret = exynos_create(fd, out);
-#endif
else
+#endif
ret = -ENOSYS;
free(name);