summaryrefslogtreecommitdiff
path: root/libdrm/xf86drm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm/xf86drm.c')
-rw-r--r--libdrm/xf86drm.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 60708144..3b66c19a 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -220,14 +220,9 @@ static int drmOpenByName(const char *name)
#if defined(XFree86Server)
if (!drmAvailable()) {
/* try to load the kernel module now */
- char filename[1000];
- snprintf(filename, 999, "misc/%s.o", name);
- /* xf86LoadKernelModule will prefix "/lib/modules/<kernel-version>"
- * for Linux, or similar for other OSes.
- */
- if (!xf86LoadKernelModule(filename)) {
- ErrorF(stderr, "[drm] failed to load kernel module \"%s\"\n",
- filename);
+ if (!xf86LoadKernelModule(name)) {
+ ErrorF("[drm] failed to load kernel module \"%s\"\n",
+ name);
return -1;
}
}