xserver: Branch 'master'

Tiago Vignatti vignatti at kemper.freedesktop.org
Fri Jul 24 03:29:10 PDT 2009


 hw/xfree86/common/xf86AutoConfig.c |   84 ++++++++++++++++++-------------------
 hw/xfree86/common/xf86Config.h     |    2 
 2 files changed, 42 insertions(+), 44 deletions(-)

New commits:
commit 1e1dbd1e462f571dad2f9684fcf4cd8ae17eedd5
Author: Tiago Vignatti <tiago.vignatti at nokia.com>
Date:   Mon Jun 29 11:46:17 2009 +0300

    xfree86: "Staticize" functions in xf86AutoConfig.c
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>

diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index bc4c80b..ac40ab3 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -271,7 +271,7 @@ xf86AutoConfig(void)
     return (ret == CONFIG_OK);
 }
 
-int 
+static int
 xchomp(char *line)
 {
     size_t len = 0;
@@ -287,46 +287,6 @@ xchomp(char *line)
     return 0;
 }
 
-GDevPtr
-autoConfigDevice(GDevPtr preconf_device)
-{
-    GDevPtr ptr = NULL;
-
-    if (!xf86configptr) {
-        return NULL;
-    }
-
-    /* If there's a configured section with no driver chosen, use it */
-    if (preconf_device) {
-        ptr = preconf_device;
-    } else {
-        ptr = xcalloc(1, sizeof(GDevRec));
-        if (!ptr) {
-            return NULL;
-        }
-        ptr->chipID = -1;
-        ptr->chipRev = -1;
-        ptr->irq = -1;
-
-        ptr->active = TRUE;
-        ptr->claimed = FALSE;
-        ptr->identifier = "Autoconfigured Video Device";
-        ptr->driver = NULL;
-    }
-    if (!ptr->driver) {
-        ptr->driver = chooseVideoDriver();
-    }
-
-    /* TODO Handle multiple screen sections */
-    if (xf86ConfigLayout.screens && !xf86ConfigLayout.screens->screen->device) {   
-        xf86ConfigLayout.screens->screen->device = ptr;
-        ptr->myScreenSection = xf86ConfigLayout.screens->screen;
-    }
-    xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n");
-
-    return ptr;
-}
-
 #ifdef __linux__
 /* This function is used to provide a workaround for binary drivers that
  * don't export their PCI ID's properly. If distros don't end up using this
@@ -531,7 +491,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
     }
 }
 
-char*
+static char*
 chooseVideoDriver(void)
 {
     char *chosen_driver = NULL;
@@ -554,3 +514,43 @@ chooseVideoDriver(void)
 
     return chosen_driver;
 }
+
+GDevPtr
+autoConfigDevice(GDevPtr preconf_device)
+{
+    GDevPtr ptr = NULL;
+
+    if (!xf86configptr) {
+        return NULL;
+    }
+
+    /* If there's a configured section with no driver chosen, use it */
+    if (preconf_device) {
+        ptr = preconf_device;
+    } else {
+        ptr = xcalloc(1, sizeof(GDevRec));
+        if (!ptr) {
+            return NULL;
+        }
+        ptr->chipID = -1;
+        ptr->chipRev = -1;
+        ptr->irq = -1;
+
+        ptr->active = TRUE;
+        ptr->claimed = FALSE;
+        ptr->identifier = "Autoconfigured Video Device";
+        ptr->driver = NULL;
+    }
+    if (!ptr->driver) {
+        ptr->driver = chooseVideoDriver();
+    }
+
+    /* TODO Handle multiple screen sections */
+    if (xf86ConfigLayout.screens && !xf86ConfigLayout.screens->screen->device) {
+        xf86ConfigLayout.screens->screen->device = ptr;
+        ptr->myScreenSection = xf86ConfigLayout.screens->screen;
+    }
+    xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n");
+
+    return ptr;
+}
diff --git a/hw/xfree86/common/xf86Config.h b/hw/xfree86/common/xf86Config.h
index 5318894..de28704 100644
--- a/hw/xfree86/common/xf86Config.h
+++ b/hw/xfree86/common/xf86Config.h
@@ -68,7 +68,5 @@ ConfigStatus xf86HandleConfigFile(Bool);
 
 Bool xf86AutoConfig(void);
 GDevPtr autoConfigDevice(GDevPtr preconf_device);
-char* chooseVideoDriver(void);
-int xchomp(char *line);
 
 #endif /* _xf86_config_h */


More information about the xorg-commit mailing list