summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xfree86/common/xf86platformBus.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index a698c6cb5..39b32484e 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -145,16 +145,9 @@ platform_find_pci_info(struct xf86_platform_device *pd, char *busid)
iter = pci_slot_match_iterator_create(&devmatch);
info = pci_device_next(iter);
- if (info) {
+ if (info)
pd->pdev = info;
- pci_device_probe(info);
- if (pci_device_is_boot_vga(info)) {
- primaryBus.type = BUS_PLATFORM;
- primaryBus.id.plat = pd;
- }
- }
pci_iterator_destroy(iter);
-
}
static Bool
@@ -307,6 +300,20 @@ xf86platformProbe(void)
platform_find_pci_info(&xf86_platform_devices[i], busid);
}
}
+
+ for (i = 0; i < xf86_num_platform_devices; i++) {
+ struct xf86_platform_device *dev = &xf86_platform_devices[i];
+
+ if (!dev->pdev)
+ continue;
+
+ pci_device_probe(dev->pdev);
+ if (pci_device_is_boot_vga(dev->pdev)) {
+ primaryBus.type = BUS_PLATFORM;
+ primaryBus.id.plat = dev;
+ }
+ }
+
return 0;
}