Skip to contentSkip to conversation

ACPI: PCI: use generic pci_swizzle_interrupt_pin()

PATCH Applied Bjorn Helgaas 2 participants 3 messages Feb 17, 2009 – Mar 17, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: PCI: use generic pci_swizzle_interrupt_pin()

Use the generic pci_swizzle_interrupt_pin() instead of ACPI-specific code.

---
 drivers/acpi/pci_irq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/pci_irq.c +1 -1
index 891bdf6..be6b909 100644
@@ -319,7 +319,7 @@ static struct acpi_prt_entry *acpi_pci_irq_lookup(struct pci_dev *dev, int pin)
 	 */
 	bridge = dev->bus->self;
 	while (bridge) {
-		pin = (((pin - 1) + PCI_SLOT(dev->devfn)) % 4) + 1;
+		pin = pci_swizzle_interrupt_pin(dev, pin);
 
 		if ((bridge->class >> 8) == PCI_CLASS_BRIDGE_CARDBUS) {
 			/* PC card has the same IRQ as its cardbridge */
#1 lore raw
Quoted 1 line · Bjorn Helgaas

Use the generic pci_swizzle_interrupt_pin() instead of ACPI-specific code.

Did you have a reaction to this? If you did, I missed it.

Quoted 18 lines
---
 drivers/acpi/pci_irq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/pci_irq.c +1 -1
index 891bdf6..be6b909 100644
@@ -319,7 +319,7 @@ static struct acpi_prt_entry
 *acpi_pci_irq_lookup(struct pci_dev *dev, int pin) */
 	bridge = dev->bus->self;
 	while (bridge) {
-		pin = (((pin - 1) + PCI_SLOT(dev->devfn)) % 4) + 1;
+		pin = pci_swizzle_interrupt_pin(dev, pin);
 
 		if ((bridge->class >> 8) == PCI_CLASS_BRIDGE_CARDBUS) {
 			/* PC card has the same IRQ as its cardbridge */