Replace pci_find_device with pci_get_device
PATCH 2/3 Replace pci_find_device with pci_get_device
As pci_find_device is going away soon I have replaced the call with pci_get_device. Judith, could you run these 3 ia64 ones through PLM, please?
Thanks a lot.
Hanna Linder
IBM Linux Technology Center
---
---
kj-domen/arch/ia64/pci/pci.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
arch/ia64/pci/pci.c renamed from arch/ia64/pci/pci.c~pci_dev_present-arch_ia64_pci_pci +1 -1
@@ -154,7 +154,7 @@ extern acpi_status acpi_map_iosapic (acpprintk (KERN_INFO "** was specified. If this was required to make a driver work,\n" );printk (KERN_INFO "** please email the output of \"lspci\" to [email protected]\n" );printk (KERN_INFO "** so I can fix the driver.\n" ); -while ((dev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL ) +while ((dev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL )acpi_pci_irq_enable (dev); }else {printk (KERN_INFO "** PCI interrupts are no longer routed automatically. If this\n" );
_
arch/ia64/pci/pci.c extern acpi_status acpi_map_iosapic (acp · line 158
Quoted 3 lines · On Monday, January 10, 2005 11:46 am, [email protected] wrote:
arch/ia64/pci/pci.c renamed from arch/ia64/pci/pci.c~pci_dev_present-arch_ia64_pci_pci +1
-1-while ((dev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL ) +while ((dev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL )acpi_pci_irq_enable (dev);
Shouldn't this be for_each_pci_dev(dev) acpi_pci_irq_enable(dev); instead? Bjorn?
Thanks,
Jesse
Quoted 10 lines · --On Monday, January 10, 2005 01:09:30 PM -0800 Jesse Barnes…
arch/ia64/pci/pci.c extern acpi_status acpi_map_iosapic (acp · line 158
Quoted 3 lines · On Monday, January 10, 2005 11:46 am, [email protected] wrote:
arch/ia64/pci/pci.c renamed from arch/ia64/pci/pci.c~pci_dev_present-arch_ia64_pci_pci +1
-1-while ((dev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL ) +while ((dev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL )acpi_pci_irq_enable (dev);Shouldn't this be
for_each_pci_dev(dev)acpi_pci_irq_enable(dev); instead? Bjorn?Thanks,
Jesse
Looks to me like it should be as well. I must have missed it when I went through and did for_each_pci_dev. I can try to make a new patch but it might take a day or two.
Hanna
Quoted 7 lines · Jesse Barnes
arch/ia64/pci/pci.c extern acpi_status acpi_map_iosapic (acp · line 158
Quoted 3 lines · On Monday, January 10, 2005 11:46 am, [email protected] wrote:
arch/ia64/pci/pci.c renamed from arch/ia64/pci/pci.c~pci_dev_present-arch_ia64_pci_pci +1
-1-while ((dev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL ) +while ((dev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL )acpi_pci_irq_enable (dev);Shouldn't this be
for_each_pci_dev(dev)acpi_pci_irq_enable(dev); instead? Bjorn?
They're equivalent, right? Looks OK to me either way. I guess if you switch to for_each_pci_dev(), you could switch the one in sba_iommu.c, too.
Quoted 6 lines · --On Monday, January 10, 2005 02:21:56 PM -0700 Bjorn Helgaas…
Quoted 2 lines
Shouldn't this be
for_each_pci_dev(dev)acpi_pci_irq_enable(dev); instead? Bjorn?They're equivalent, right? Looks OK to me either way. I guess if you switch to
for_each_pci_dev(), you could switch the one insba_iommu.c, too.
Yes they are equivalent. Will do.
Hanna
Re: [patch 2/3] Replace pci_find_device with pci_get_device - pci.c
In reply to [email protected]Quoted 6 lines · --On Monday, January 10, 2005 02:21:56 PM -0700 Bjorn Helgaas…
Quoted 5 lines · Jesse Barnes
Quoted 3 lines · On Monday, January 10, 2005 11:46 am, [email protected] wrote:
(quoted diff) +1
-1- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) + while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) acpi_pci_irq_enable(dev);
Quoted 6 lines
Quoted 2 lines
Shouldn't this be
for_each_pci_dev(dev)acpi_pci_irq_enable(dev); instead? Bjorn?They're equivalent, right? Looks OK to me either way. I guess if you switch to
for_each_pci_dev(), you could switch the one insba_iommu.c, too.
Ok. Here is the reroll of the original patch to us for_each_pci_dev:
arch/ia64/pci/pci.c +1 -1
@@ -154,7 +154,7 @@ extern acpi_status acpi_map_iosapic (acpprintk (KERN_INFO "** was specified. If this was required to make a driver work,\n" );printk (KERN_INFO "** please email the output of \"lspci\" to [email protected]\n" );printk (KERN_INFO "** so I can fix the driver.\n" ); -while ((dev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL ) +for_each_pci_dev (dev)acpi_pci_irq_enable (dev); }else {printk (KERN_INFO "** PCI interrupts are no longer routed automatically. If this\n" );
Re: [patch 2/3] Replace pci_find_device with pci_get_device - sba_iommu.c
In reply to [email protected]Quoted 6 lines · --On Monday, January 10, 2005 02:21:56 PM -0700 Bjorn Helgaas…
Quoted 5 lines · Jesse Barnes
Quoted 3 lines · On Monday, January 10, 2005 11:46 am, [email protected] wrote:
(quoted diff) +1
-1- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) + while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) acpi_pci_irq_enable(dev);
Quoted 6 lines
Quoted 2 lines
Shouldn't this be
for_each_pci_dev(dev)acpi_pci_irq_enable(dev); instead? Bjorn?They're equivalent, right? Looks OK to me either way. I guess if you switch to
for_each_pci_dev(), you could switch the one insba_iommu.c, too.
Here is the reroll of the sba_iommu.c patch to use for_each_pci_dev.
arch/ia64/hp/common/sba_iommu.c +1 -1
@@ -1557,7 +1557,7 @@ ioc_iova_init(struct ioc *ioc)** We program the next pdir index after we stop w/ a key for ** the GART code to handshake on. */ -while ((device =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , device)) !=NULL ) +for_each_pci_dev (device) agp_found |=pci_find_capability (device,PCI_CAP_ID_AGP );if (agp_found && reserve_sba_gart) {