Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128110
b: refs/heads/master
c: 3b1ea18
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Dec 31, 2008
1 parent 678688f commit 7017480
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: beba8a643d7f774cf27c3c92a51b99cebf787415
refs/heads/master: 3b1ea18d3b3542b55861d7f968ded705e3bc2aa6
33 changes: 16 additions & 17 deletions trunk/drivers/acpi/pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,16 +384,15 @@ acpi_pci_irq_lookup(struct pci_dev *dev, int pin)
struct acpi_prt_entry *entry;

entry = acpi_pci_irq_find_prt_entry(dev, pin);
if (!entry) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No %s[%c] _PRT entry\n",
if (entry) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %s[%c] _PRT entry\n",
pci_name(dev), pin_name(pin)));
return NULL;
return entry;
}

ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %s[%c] _PRT entry\n",
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No %s[%c] _PRT entry\n",
pci_name(dev), pin_name(pin)));

return entry;
return NULL;
}

static struct acpi_prt_entry *
Expand All @@ -408,7 +407,7 @@ acpi_pci_irq_derive(struct pci_dev *dev, int pin)
* Attempt to derive an IRQ for this device from a parent bridge's
* PCI interrupt routing entry (eg. yenta bridge and add-in card bridge).
*/
while (!entry && bridge->bus->self) {
while (bridge->bus->self) {
pin = (((pin - 1) + PCI_SLOT(bridge->devfn)) % 4) + 1;
bridge = bridge->bus->self;

Expand All @@ -425,18 +424,18 @@ acpi_pci_irq_derive(struct pci_dev *dev, int pin)
}

entry = acpi_pci_irq_lookup(bridge, pin);
if (entry) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Derived GSI for %s INT %c from %s\n",
pci_name(dev), pin_name(orig_pin),
pci_name(bridge)));
return entry;
}
}

if (!entry) {
dev_warn(&dev->dev, "can't derive routing for PCI INT %c\n",
pin_name(orig_pin));
return NULL;
}

ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derived GSI for %s INT %c from %s\n",
pci_name(dev), pin_name(orig_pin), pci_name(bridge)));

return entry;
dev_warn(&dev->dev, "can't derive routing for PCI INT %c\n",
pin_name(orig_pin));
return NULL;
}

/*
Expand Down

0 comments on commit 7017480

Please sign in to comment.