Commit 8015a014 authored by Kristen Accardi's avatar Kristen Accardi Committed by Greg Kroah-Hartman

[PATCH] apci: use pin stored in pci_dev

Use the stored value of the Interrupt Pin, rather than try to read
it again.
Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ffeff788
...@@ -361,8 +361,7 @@ acpi_pci_irq_derive(struct pci_dev *dev, ...@@ -361,8 +361,7 @@ acpi_pci_irq_derive(struct pci_dev *dev,
if ((bridge->class >> 8) == PCI_CLASS_BRIDGE_CARDBUS) { if ((bridge->class >> 8) == PCI_CLASS_BRIDGE_CARDBUS) {
/* PC card has the same IRQ as its cardbridge */ /* PC card has the same IRQ as its cardbridge */
pci_read_config_byte(bridge, PCI_INTERRUPT_PIN, bridge_pin = bridge->pin;
&bridge_pin);
if (!bridge_pin) { if (!bridge_pin) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"No interrupt pin configured for device %s\n", "No interrupt pin configured for device %s\n",
...@@ -412,7 +411,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) ...@@ -412,7 +411,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
if (!dev) if (!dev)
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); pin = dev->pin;
if (!pin) { if (!pin) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"No interrupt pin configured for device %s\n", "No interrupt pin configured for device %s\n",
...@@ -503,7 +502,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev) ...@@ -503,7 +502,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
if (!dev || !dev->bus) if (!dev || !dev->bus)
return_VOID; return_VOID;
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); pin = dev->pin;
if (!pin) if (!pin)
return_VOID; return_VOID;
pin--; pin--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment