[PATCH] PCI fixes for 2.6.10-rc1

Greg KH
2004-11-12T23:35:16Z

ChangeSet 1.2000.10.1, 2004/10/20 15:35:44-07:00, greg@kroah.com

PCI: use pci_dev_present() in irq.c check

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>

arch/i386/pci/irq.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)

diff -Nru a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
--- a/arch/i386/pci/irq.c 2004-11-12 15:14:50 -08:00
+++ b/arch/i386/pci/irq.c 2004-11-12 15:14:50 -08:00
@@ -452,21 +452,17 @@

#endif

-
static __init int intel_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
{
- struct pci_dev *dev1, *dev2;
+ static struct pci_device_id pirq_440gx[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0) },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_2) },
+ { },
+ };

/* 440GX has a proprietary PIRQ router -- don't use it */
- dev1 = pci_get_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_82443GX_0, NULL);
- dev2 = pci_get_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_82443GX_2, NULL);
- if ((dev1 != NULL) || (dev2 != NULL)) {
- pci_dev_put(dev1);
- pci_dev_put(dev2);
+ if (pci_dev_present(pirq_440gx))
return 0;
- }

switch(device)
{