mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-28 21:33:09 +00:00
Eliminate the last few places outside xf86pciBus.c that use
xf86PciVideoInfo. In all cases this means converting the code to use the pci_device_iterator interfaces.
This commit is contained in:
parent
5bfb2ee965
commit
83ebf61ec0
4 changed files with 55 additions and 56 deletions
|
|
@ -213,23 +213,23 @@ xf86AutoConfig(void)
|
|||
{
|
||||
const char **p;
|
||||
char buf[1024];
|
||||
struct pci_device ** pciptr;
|
||||
struct pci_device_iterator *iter;
|
||||
struct pci_device * info = NULL;
|
||||
char *driver = NULL;
|
||||
ConfigStatus ret;
|
||||
|
||||
/* Find the primary device, and get some information about it. */
|
||||
if (xf86PciVideoInfo) {
|
||||
for (pciptr = xf86PciVideoInfo; (info = *pciptr); pciptr++) {
|
||||
if (xf86IsPrimaryPci(info)) {
|
||||
break;
|
||||
}
|
||||
iter = pci_slot_match_iterator_create(NULL);
|
||||
while ((info = pci_device_next(iter)) != NULL) {
|
||||
if (xf86IsPrimaryPci(info)) {
|
||||
break;
|
||||
}
|
||||
if (!info) {
|
||||
ErrorF("Primary device is not PCI\n");
|
||||
}
|
||||
} else {
|
||||
ErrorF("xf86PciVideoInfo is not set\n");
|
||||
}
|
||||
|
||||
pci_iterator_destroy(iter);
|
||||
|
||||
if (!info) {
|
||||
ErrorF("Primary device is not PCI\n");
|
||||
}
|
||||
|
||||
if (info)
|
||||
|
|
|
|||
Loading…
Reference in a new issue