From e4de522b75e5004aec6fd2c24e783733beebe614 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 8 Oct 2006 15:38:22 -0700 Subject: [PATCH] --- yaml --- r: 39139 b: refs/heads/master c: e24bb60e11e3fe9858b71874a4ac59333adbc4fc h: refs/heads/master i: 39137: e27507d69f2ac40b0781dc1c51b520c82d31c7a9 39135: 2138684c48c5aab9f3f59e72582fb2d8119eef6c v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/prom_parse.c | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index b906ceaa5e6b..c2ea74a0618e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0bae89ec8b1519dae67036637942f5b5bbaa9424 +refs/heads/master: e24bb60e11e3fe9858b71874a4ac59333adbc4fc diff --git a/trunk/arch/powerpc/kernel/prom_parse.c b/trunk/arch/powerpc/kernel/prom_parse.c index 17fcb4842fe5..603dff3ad62a 100644 --- a/trunk/arch/powerpc/kernel/prom_parse.c +++ b/trunk/arch/powerpc/kernel/prom_parse.c @@ -914,17 +914,6 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) u8 pin; int rc; - /* We need to first check if the PCI device has a PCI interrupt at all - * since we have cases where the device-node might expose non-PCI - * interrupts, but the device has no PCI interrupt to it - */ - rc = pci_read_config_byte(pdev, PCI_INTERRUPT_PIN, &pin); - if (rc != 0) - return rc; - /* No pin, exit */ - if (pin == 0) - return -ENODEV; - /* Check if we have a device node, if yes, fallback to standard OF * parsing */ @@ -936,6 +925,12 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) * interrupt spec. we assume #interrupt-cells is 1, which is standard * for PCI. If you do different, then don't use that routine. */ + rc = pci_read_config_byte(pdev, PCI_INTERRUPT_PIN, &pin); + if (rc != 0) + return rc; + /* No pin, exit */ + if (pin == 0) + return -ENODEV; /* Now we walk up the PCI tree */ lspec = pin;