[AGPGART] Use pci_get_slot not pci_find_slot

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>

authored by Alan Cox and committed by Venkatesh Pallipadi 7357db12 b2782408

+6 -2
+6 -2
drivers/char/agp/amd64-agp.c
··· 409 int i; 410 unsigned size = amd64_fetch_size(); 411 printk(KERN_INFO "Setting up ULi AGP.\n"); 412 - dev1 = pci_find_slot ((unsigned int)pdev->bus->number,PCI_DEVFN(0,0)); 413 if (dev1 == NULL) { 414 printk(KERN_INFO PFX "Detected a ULi chipset, " 415 "but could not fine the secondary device.\n"); ··· 442 enuscr= httfea+ (size * 1024 * 1024) - 1; 443 pci_write_config_dword(dev1, ULI_X86_64_HTT_FEA_REG, httfea); 444 pci_write_config_dword(dev1, ULI_X86_64_ENU_SCR_REG, enuscr); 445 return 0; 446 } 447 ··· 468 469 printk(KERN_INFO PFX "Setting up Nforce3 AGP.\n"); 470 471 - dev1 = pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(11, 0)); 472 if (dev1 == NULL) { 473 printk(KERN_INFO PFX "agpgart: Detected an NVIDIA " 474 "nForce3 chipset, but could not find " ··· 511 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT1, aplimit); 512 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APBASE2, apbase); 513 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT2, aplimit); 514 515 return 0; 516 }
··· 409 int i; 410 unsigned size = amd64_fetch_size(); 411 printk(KERN_INFO "Setting up ULi AGP.\n"); 412 + dev1 = pci_get_slot (pdev->bus,PCI_DEVFN(0,0)); 413 if (dev1 == NULL) { 414 printk(KERN_INFO PFX "Detected a ULi chipset, " 415 "but could not fine the secondary device.\n"); ··· 442 enuscr= httfea+ (size * 1024 * 1024) - 1; 443 pci_write_config_dword(dev1, ULI_X86_64_HTT_FEA_REG, httfea); 444 pci_write_config_dword(dev1, ULI_X86_64_ENU_SCR_REG, enuscr); 445 + 446 + pci_dev_put(dev1); 447 return 0; 448 } 449 ··· 466 467 printk(KERN_INFO PFX "Setting up Nforce3 AGP.\n"); 468 469 + dev1 = pci_get_slot(pdev->bus, PCI_DEVFN(11, 0)); 470 if (dev1 == NULL) { 471 printk(KERN_INFO PFX "agpgart: Detected an NVIDIA " 472 "nForce3 chipset, but could not find " ··· 509 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT1, aplimit); 510 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APBASE2, apbase); 511 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT2, aplimit); 512 + 513 + pci_dev_put(dev1); 514 515 return 0; 516 }