diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-12-08 23:31:11 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-12-30 21:39:22 -0500 |
commit | ee40136313323db1096b17df7b436d22a24ef2be (patch) | |
tree | dbe544334f1caf25cc01f7327366372e36486a41 | |
parent | 3b1ea18d3b3542b55861d7f968ded705e3bc2aa6 (diff) |
ACPI: PCI: follow typical PCI INTx swizzling pattern
No functional change; this just uses the typical pattern of
PCI INTx swizzling done on other architectures.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/acpi/pci_irq.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index e42481f64495..b35e64d71409 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -399,7 +399,7 @@ static struct acpi_prt_entry * | |||
399 | acpi_pci_irq_derive(struct pci_dev *dev, int pin) | 399 | acpi_pci_irq_derive(struct pci_dev *dev, int pin) |
400 | { | 400 | { |
401 | struct acpi_prt_entry *entry = NULL; | 401 | struct acpi_prt_entry *entry = NULL; |
402 | struct pci_dev *bridge = dev; | 402 | struct pci_dev *bridge; |
403 | u8 bridge_pin = 0, orig_pin = pin; | 403 | u8 bridge_pin = 0, orig_pin = pin; |
404 | 404 | ||
405 | 405 | ||
@@ -407,9 +407,9 @@ acpi_pci_irq_derive(struct pci_dev *dev, int pin) | |||
407 | * Attempt to derive an IRQ for this device from a parent bridge's | 407 | * Attempt to derive an IRQ for this device from a parent bridge's |
408 | * PCI interrupt routing entry (eg. yenta bridge and add-in card bridge). | 408 | * PCI interrupt routing entry (eg. yenta bridge and add-in card bridge). |
409 | */ | 409 | */ |
410 | while (bridge->bus->self) { | 410 | bridge = dev->bus->self; |
411 | pin = (((pin - 1) + PCI_SLOT(bridge->devfn)) % 4) + 1; | 411 | while (bridge) { |
412 | bridge = bridge->bus->self; | 412 | pin = (((pin - 1) + PCI_SLOT(dev->devfn)) % 4) + 1; |
413 | 413 | ||
414 | if ((bridge->class >> 8) == PCI_CLASS_BRIDGE_CARDBUS) { | 414 | if ((bridge->class >> 8) == PCI_CLASS_BRIDGE_CARDBUS) { |
415 | /* PC card has the same IRQ as its cardbridge */ | 415 | /* PC card has the same IRQ as its cardbridge */ |
@@ -431,6 +431,9 @@ acpi_pci_irq_derive(struct pci_dev *dev, int pin) | |||
431 | pci_name(bridge))); | 431 | pci_name(bridge))); |
432 | return entry; | 432 | return entry; |
433 | } | 433 | } |
434 | |||
435 | dev = bridge; | ||
436 | bridge = dev->bus->self; | ||
434 | } | 437 | } |
435 | 438 | ||
436 | dev_warn(&dev->dev, "can't derive routing for PCI INT %c\n", | 439 | dev_warn(&dev->dev, "can't derive routing for PCI INT %c\n", |