This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / char / agp / amd64-agp.c
index 2f56e3a..88d73a5 100644 (file)
@@ -361,7 +361,7 @@ static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
        int i = 0;
 
        /* cache pci_devs of northbridges. */
-       while ((loop_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev))
+       while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev))
                        != NULL) {
                if (i == MAX_HAMMER_GARTS) {
                        printk(KERN_ERR PFX "Too many northbridges for AGP\n");
@@ -704,11 +704,6 @@ static struct pci_driver agp_amd64_pci_driver = {
 int __init agp_amd64_init(void)
 {
        int err = 0;
-       static struct pci_device_id amd64nb[] = {
-               { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1103) },
-               { },
-       };
-
        if (agp_off)
                return -EINVAL;
        if (pci_module_init(&agp_amd64_pci_driver) > 0) {
@@ -724,13 +719,13 @@ int __init agp_amd64_init(void)
                }
 
                /* First check that we have at least one AMD64 NB */
-               if (!pci_dev_present(amd64nb))
+               if (!pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, NULL))
                        return -ENODEV;
 
                /* Look for any AGP bridge */
                dev = NULL;
                err = -ENODEV;
-               for_each_pci_dev(dev) {
+               while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev))) {
                        if (!pci_find_capability(dev, PCI_CAP_ID_AGP))
                                continue;
                        /* Only one bridge supported right now */