Commit 9772b0b3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

PCI: use pci_dev_present() in irq.c check

Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent a8ff8803
......@@ -452,21 +452,17 @@ static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq,
#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)
{
......
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