diff options
-rw-r--r-- | arch/powerpc/kernel/prom_parse.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index 17fcb4842fe5..603dff3ad62a 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c | |||
@@ -914,17 +914,6 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) | |||
914 | u8 pin; | 914 | u8 pin; |
915 | int rc; | 915 | int rc; |
916 | 916 | ||
917 | /* We need to first check if the PCI device has a PCI interrupt at all | ||
918 | * since we have cases where the device-node might expose non-PCI | ||
919 | * interrupts, but the device has no PCI interrupt to it | ||
920 | */ | ||
921 | rc = pci_read_config_byte(pdev, PCI_INTERRUPT_PIN, &pin); | ||
922 | if (rc != 0) | ||
923 | return rc; | ||
924 | /* No pin, exit */ | ||
925 | if (pin == 0) | ||
926 | return -ENODEV; | ||
927 | |||
928 | /* Check if we have a device node, if yes, fallback to standard OF | 917 | /* Check if we have a device node, if yes, fallback to standard OF |
929 | * parsing | 918 | * parsing |
930 | */ | 919 | */ |
@@ -936,6 +925,12 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) | |||
936 | * interrupt spec. we assume #interrupt-cells is 1, which is standard | 925 | * interrupt spec. we assume #interrupt-cells is 1, which is standard |
937 | * for PCI. If you do different, then don't use that routine. | 926 | * for PCI. If you do different, then don't use that routine. |
938 | */ | 927 | */ |
928 | rc = pci_read_config_byte(pdev, PCI_INTERRUPT_PIN, &pin); | ||
929 | if (rc != 0) | ||
930 | return rc; | ||
931 | /* No pin, exit */ | ||
932 | if (pin == 0) | ||
933 | return -ENODEV; | ||
939 | 934 | ||
940 | /* Now we walk up the PCI tree */ | 935 | /* Now we walk up the PCI tree */ |
941 | lspec = pin; | 936 | lspec = pin; |