summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@nokia.com>2009-06-29 11:46:17 +0300
committerTiago Vignatti <tiago.vignatti@nokia.com>2009-07-24 13:25:42 +0300
commit1e1dbd1e462f571dad2f9684fcf4cd8ae17eedd5 (patch)
tree343a2bd08e7d5c3fbd1667364ec4493449117f4f
parent7c6b5458de9bc7f6cd972a36b56888aaa3d201ee (diff)
xfree86: "Staticize" functions in xf86AutoConfig.c
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r--hw/xfree86/common/xf86AutoConfig.c84
-rw-r--r--hw/xfree86/common/xf86Config.h2
2 files changed, 42 insertions, 44 deletions
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index bc4c80bad..ac40ab35c 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 53188941f..de287041a 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 */