[Mesa-dev] [PATCH 11/16] pipe-loader: pass only the driver_name to pipe_loader_find_module

Nicolai Hähnle nhaehnle at gmail.com
Fri Jun 30 12:45:52 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/gallium/auxiliary/pipe-loader/pipe_loader.c      | 6 +++---
 src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
index f55312f..cb37f30 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
@@ -111,39 +111,39 @@ struct pipe_screen *
 pipe_loader_create_screen(struct pipe_loader_device *dev,
                           struct pipe_screen_config *config)
 {
    pipe_loader_load_options(dev);
    config->options = &dev->option_cache;
 
    return dev->ops->create_screen(dev, config);
 }
 
 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;
    const char *next;
    char path[PATH_MAX];
    int len, ret;
 
    for (next = library_paths; *next; library_paths = next + 1) {
       next = util_strchrnul(library_paths, ':');
       len = next - library_paths;
 
       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);
          if (lib) {
             return lib;
          }
       }
    }
 
    return NULL;
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h b/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h
index 37219fb..699040d 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_priv.h
@@ -34,24 +34,24 @@ struct pipe_loader_ops {
    struct pipe_screen *(*create_screen)(struct pipe_loader_device *dev,
                                         const struct pipe_screen_config *config);
 
    const struct drm_conf_ret *(*configuration)(struct pipe_loader_device *dev,
                                                enum drm_conf conf);
 
    void (*release)(struct pipe_loader_device **dev);
 };
 
 /**
- * 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);
 
 /**
  * Free the base device structure.
  *
  * Implementations of pipe_loader_ops::release must call this.
  *
  * (*dev)->driver_name must be freed by the caller if it was allocated on the
  * heap.
  */
-- 
2.9.3



More information about the mesa-dev mailing list