Commit c4d4d388 authored by Linus Torvalds's avatar Linus Torvalds

Fix up AGP device discovery.

The previous revert needed some more work to make it actually work.
parent 0ef0d8d3
...@@ -632,21 +632,19 @@ static void agp_v3_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_ ...@@ -632,21 +632,19 @@ static void agp_v3_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_
u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 requested_mode, u32 bridge_agpstat) u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 requested_mode, u32 bridge_agpstat)
{ {
struct pci_dev *device = NULL; struct pci_dev *device = NULL;
u8 cap_ptr = 0;
u32 vga_agpstat; u32 vga_agpstat;
u8 cap_ptr;
while (!cap_ptr) { for (;;) {
device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, device); device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, device);
if (!device) { if (!device) {
printk (KERN_INFO PFX "Couldn't find an AGP VGA controller.\n"); printk (KERN_INFO PFX "Couldn't find an AGP VGA controller.\n");
return 0; return 0;
} }
cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP); cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP);
if (!cap_ptr) { if (cap_ptr)
pci_dev_put(device); break;
continue; pci_dev_put(device);
}
cap_ptr = 0;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment