On 04/17/2016 01:07 PM, Emil Velikov wrote:
Similar to its little brothre - LoadSubModule. Currently all call sites
provide NULL anyway ;-)

Cc: Aaron Plattner <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
---

Aaron, are you guys using the argument in the closed source driver ?

We don't call LoadModule at all.

-Emil


  hw/xfree86/common/xf86Helper.c  | 2 +-
  hw/xfree86/common/xf86Init.c    | 2 +-
  hw/xfree86/doc/ddxDesign.xml    | 8 +-------
  hw/xfree86/loader/loaderProcs.h | 2 +-
  hw/xfree86/loader/loadmod.c     | 7 +++----
  5 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 3b01a49..2c0f0d8 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1626,7 +1626,7 @@ xf86LoadOneModule(const char *name, void *opt)
          return NULL;
      }

-    mod = LoadModule(Name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin);
+    mod = LoadModule(Name, NULL, NULL, opt, NULL, &errmaj, &errmin);
      if (!mod)
          LoaderErrorMsg(NULL, Name, errmaj, errmin);
      free(Name);
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index de51497..9b88e29 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1571,7 +1571,7 @@ xf86LoadModules(const char **list, void **optlist)
          else
              opt = NULL;

-        if (!LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin)) {
+        if (!LoadModule(name, NULL, NULL, opt, NULL, &errmaj, &errmin)) {
              LoaderErrorMsg(NULL, name, errmaj, errmin);
              failed = TRUE;
          }
diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
index a8e539c..7baf2cb 100644
--- a/hw/xfree86/doc/ddxDesign.xml
+++ b/hw/xfree86/doc/ddxDesign.xml
@@ -5222,7 +5222,7 @@ XFree86 common layer.

        <blockquote><para>
          <programlisting>
-    pointer LoadModule(const char *module, const char *path,
+    pointer LoadModule(const char *module,
                         const char **subdirlist, const char **patternlist,
                         pointer options, const XF86ModReqInfo * modreq,
                         int *errmaj, int *errmin);
@@ -5238,12 +5238,6 @@ XFree86 common layer.
      This might change.  The other parameters are:

              <variablelist>
-               <varlistentry>
-                 <term><parameter>path</parameter></term>
-                 <listitem><para>
-                 An optional comma-separated list of module search paths.
-                 When <constant>NULL</constant>, the default search path is 
used.
-                   </para></listitem></varlistentry>


                <varlistentry>
diff --git a/hw/xfree86/loader/loaderProcs.h b/hw/xfree86/loader/loaderProcs.h
index cfc4d80..8d7872f 100644
--- a/hw/xfree86/loader/loaderProcs.h
+++ b/hw/xfree86/loader/loaderProcs.h
@@ -74,7 +74,7 @@ void LoaderInit(void);

  ModuleDescPtr LoadDriver(const char *, const char *, int, void *, int *,
                           int *);
-ModuleDescPtr LoadModule(const char *, const char *, const char **,
+ModuleDescPtr LoadModule(const char *, const char **,
                           const char **, void *, const XF86ModReqInfo *,
                           int *, int *);
  ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 702d4e7..603ef65 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -747,7 +747,7 @@ LoadSubModule(void *_parent, const char *module,
          return NULL;
      }

-    submod = LoadModule(module, NULL, subdirlist, patternlist, options,
+    submod = LoadModule(module, subdirlist, patternlist, options,
                          modreq, errmaj, errmin);
      if (submod && submod != (ModuleDescPtr) 1) {
          parent->child = AddSibling(parent->child, submod);
@@ -817,7 +817,6 @@ static const char *compiled_in_modules[] = {
   * module       The module name.  Normally this is not a filename but the
   *              module's "canonical name.  A full pathname is, however,
   *              also accepted.
- * path         A comma separated list of module directories.
   * subdirlist   A NULL terminated list of subdirectories to search.  When
   *              NULL, the default "stdSubdirs" list is used.  The default
   *              list is also substituted for entries with value DEFAULT_LIST.
@@ -849,7 +848,7 @@ static const char *compiled_in_modules[] = {
   *
   */
  ModuleDescPtr
-LoadModule(const char *module, const char *path, const char **subdirlist,
+LoadModule(const char *module, const char **subdirlist,
             const char **patternlist, void *options,
             const XF86ModReqInfo * modreq, int *errmaj, int *errmin)
  {
@@ -905,7 +904,7 @@ LoadModule(const char *module, const char *path, const char 
**subdirlist,
          goto LoadModule_fail;
      }

-    pathlist = InitPathList(path);
+    pathlist = InitPathList(NULL);
      if (!pathlist) {
          /* This could be a malloc failure too */
          if (errmaj)


Reviewed-by: Aaron Plattner <[email protected]>

--
Aaron
nvpublic
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to