summaryrefslogtreecommitdiffstats
path: root/arch/x86/pci
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-05-15 13:05:16 -0700
committerIngo Molnar <mingo@elte.hu>2009-05-18 08:38:55 +0200
commite5198075c67a22ec9a09565b1ce88d3d3f5ba855 (patch)
tree3d4ea0efd8575e677509b022e649c62d4786ed55 /arch/x86/pci
parentb5710ce92a8cf8e3fc0ffc230cfdbfa23463f1c8 (diff)
downloadop-kernel-dev-e5198075c67a22ec9a09565b1ce88d3d3f5ba855.zip
op-kernel-dev-e5198075c67a22ec9a09565b1ce88d3d3f5ba855.tar.gz
x86, apic: introduce io_apic_irq_attr
according to Ingo, io_apic irq-setup related functions have too many parameters with a repetitive signature. So reduce related funcs to get less params by passing a pointer to a newly defined io_apic_irq_attr structure. v2: io_apic_irq ==> irq_attr triggering ==> trigger v3: add set_io_apic_irq_attr [ Impact: cleanup ] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Len Brown <lenb@kernel.org> LKML-Reference: <4A08ACD3.2070401@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/pci')
-rw-r--r--arch/x86/pci/irq.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
index 2f3e192..0696d50 100644
--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -1200,14 +1200,11 @@ static int pirq_enable_irq(struct pci_dev *dev)
#ifdef CONFIG_X86_IO_APIC
struct pci_dev *temp_dev;
int irq;
- int ioapic = -1, ioapic_pin = -1;
- int triggering, polarity;
+ struct io_apic_irq_attr irq_attr;
irq = IO_APIC_get_PCI_irq_vector(dev->bus->number,
PCI_SLOT(dev->devfn),
- pin - 1,
- &ioapic, &ioapic_pin,
- &triggering, &polarity);
+ pin - 1, &irq_attr);
/*
* Busses behind bridges are typically not listed in the MP-table.
* In this case we have to look up the IRQ based on the parent bus,
@@ -1221,9 +1218,7 @@ static int pirq_enable_irq(struct pci_dev *dev)
pin = pci_swizzle_interrupt_pin(dev, pin);
irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
PCI_SLOT(bridge->devfn),
- pin - 1,
- &ioapic, &ioapic_pin,
- &triggering, &polarity);
+ pin - 1, &irq_attr);
if (irq >= 0)
dev_warn(&dev->dev, "using bridge %s "
"INT %c to get IRQ %d\n",
@@ -1233,9 +1228,8 @@ static int pirq_enable_irq(struct pci_dev *dev)
}
dev = temp_dev;
if (irq >= 0) {
- io_apic_set_pci_routing(&dev->dev, ioapic,
- ioapic_pin, irq,
- triggering, polarity);
+ io_apic_set_pci_routing(&dev->dev, irq,
+ &irq_attr);
dev->irq = irq;
dev_info(&dev->dev, "PCI->APIC IRQ transform: "
"INT %c -> IRQ %d\n", 'A' + pin - 1, irq);
OpenPOWER on IntegriCloud