pipe-loader: pass only the driver_name to pipe_loader_find_module
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 30 Jun 2017 08:30:14 +0000 (10:30 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 2 Aug 2017 07:50:58 +0000 (09:50 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/pipe-loader/pipe_loader.c
src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h

index f55312f548a597c501a4db3cf6c17484112eadd8..cb37f30c02e93505ade6b3c17fba19161f1b8f77 100644 (file)
@@ -118,7 +118,7 @@ pipe_loader_create_screen(struct pipe_loader_device *dev,
 }
 
 struct util_dl_library *
-pipe_loader_find_module(struct pipe_loader_device *dev,
+pipe_loader_find_module(const char *driver_name,
                         const char *library_paths)
 {
    struct util_dl_library *lib;
@@ -133,10 +133,10 @@ pipe_loader_find_module(struct pipe_loader_device *dev,
       if (len)
          ret = util_snprintf(path, sizeof(path), "%.*s/%s%s%s",
                              len, library_paths,
-                             MODULE_PREFIX, dev->driver_name, UTIL_DL_EXT);
+                             MODULE_PREFIX, driver_name, UTIL_DL_EXT);
       else
          ret = util_snprintf(path, sizeof(path), "%s%s%s",
-                             MODULE_PREFIX, dev->driver_name, UTIL_DL_EXT);
+                             MODULE_PREFIX, driver_name, UTIL_DL_EXT);
 
       if (ret > 0 && ret < sizeof(path)) {
          lib = util_dl_open(path);
index 37219fb89413ef1339e6c06c6d57094ff1013e5f..699040d71627b7852c96ade5497d3e508f045bda 100644 (file)
@@ -41,10 +41,10 @@ struct pipe_loader_ops {
 };
 
 /**
- * Open the pipe driver module that handles a specified device.
+ * Open the pipe driver module that contains the specified driver.
  */
 struct util_dl_library *
-pipe_loader_find_module(struct pipe_loader_device *dev,
+pipe_loader_find_module(const char *driver_name,
                         const char *library_paths);
 
 /**