The move of the PCI device id probing into a separate file neglected to
return the number of found devices, and so the PCI devices were being
overwritten by the default entries for vesa and fbdev.

Signed-off-by: Chris Wilson <[email protected]>
Cc: Tiago Vignatti <[email protected]>
Cc: Alex Deucher <[email protected]>
---
 hw/xfree86/common/xf86AutoConfig.c |    2 +-
 hw/xfree86/common/xf86pciBus.c     |    4 +++-
 hw/xfree86/common/xf86pciBus.h     |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/common/xf86AutoConfig.c 
b/hw/xfree86/common/xf86AutoConfig.c
index 8947a4f..5b236af 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -257,7 +257,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
     }
 #endif
 
-    xf86PciMatchDriver(matches, nmatches);
+    i = xf86PciMatchDriver(matches, nmatches);
 
     /* Fallback to platform default hardware */
     if (i < (nmatches - 1)) {
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 085be01..3e0961a 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1294,7 +1294,7 @@ matchDriverFromFiles (char** matches, uint16_t 
match_vendor, uint16_t match_chip
 }
 #endif /* __linux__ */
 
-void
+int
 xf86PciMatchDriver(char* matches[], int nmatches) {
     int i;
     struct pci_device * info = NULL;
@@ -1326,4 +1326,6 @@ xf86PciMatchDriver(char* matches[], int nmatches) {
     if ((info != NULL) && (i < nmatches)) {
        i += videoPtrToDriverList(info, &(matches[i]), nmatches - i);
     }
+
+    return i;
 }
diff --git a/hw/xfree86/common/xf86pciBus.h b/hw/xfree86/common/xf86pciBus.h
index f84a496..3f02b93 100644
--- a/hw/xfree86/common/xf86pciBus.h
+++ b/hw/xfree86/common/xf86pciBus.h
@@ -37,6 +37,6 @@ void xf86PciProbe(void);
 Bool xf86PciAddMatchingDev(DriverPtr drvp);
 Bool xf86PciProbeDev(DriverPtr drvp);
 void xf86PciIsolateDevice(char *argument);
-void xf86PciMatchDriver(char* matches[], int nmatches);
+int xf86PciMatchDriver(char* matches[], int nmatches);
 
 #endif /* _XF86_PCI_BUS_H */
-- 
1.7.1

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

Reply via email to