diff options
-rw-r--r-- | lib/drmtest.c | 7 | ||||
-rw-r--r-- | lib/igt_kmod.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c index 35f71c0d..fab705ad 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -51,8 +51,9 @@ #include "i915_drm.h" #include "intel_chipset.h" #include "intel_io.h" -#include "igt_gt.h" #include "igt_debugfs.h" +#include "igt_gt.h" +#include "igt_kmod.h" #include "version.h" #include "config.h" #include "intel_reg.h" @@ -228,9 +229,7 @@ int drm_get_card(void) static int modprobe(const char *driver) { - char buf[128]; - snprintf(buf, sizeof(buf), "/sbin/modprobe -s %s", driver); - return system(buf); + return igt_kmod_load(driver, ""); } /** diff --git a/lib/igt_kmod.h b/lib/igt_kmod.h index 10cd3a2d..fd307a45 100644 --- a/lib/igt_kmod.h +++ b/lib/igt_kmod.h @@ -26,6 +26,8 @@ #include <libkmod.h> +#include "igt_aux.h" + bool igt_kmod_is_loaded(const char *mod_name); void igt_kmod_list_loaded(void); |