Skip to content

Commit

Permalink
xfree86: Unbreak autoconfig following 0abf065
Browse files Browse the repository at this point in the history
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]>
Reviewed-by: Julien Cristau <[email protected]>
Reviewed-by: Tiago Vignatti <[email protected]>
Signed-off-by: Keith Packard <[email protected]>
  • Loading branch information
ickle authored and keith-packard committed Jun 3, 2010
1 parent 1304b8b commit d90f2cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hw/xfree86/common/xf86AutoConfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
8 changes: 7 additions & 1 deletion hw/xfree86/common/xf86pciBus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,11 @@ matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip
}
#endif /* __linux__ */

void
/**
* @return The numbers of found devices that match with the current system
* drivers.
*/
int
xf86PciMatchDriver(char* matches[], int nmatches) {
int i;
struct pci_device * info = NULL;
Expand Down Expand Up @@ -1326,4 +1330,6 @@ xf86PciMatchDriver(char* matches[], int nmatches) {
if ((info != NULL) && (i < nmatches)) {
i += videoPtrToDriverList(info, &(matches[i]), nmatches - i);
}

return i;
}
2 changes: 1 addition & 1 deletion hw/xfree86/common/xf86pciBus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit d90f2cd

Please sign in to comment.