aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/visws.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-12-09 18:12:37 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 14:12:54 -0500
commitb1c86792a0f3cf24a12c1ac7d452d665d90284b1 (patch)
tree0ef20106a3fd4169ff04e9c5fd20542bfaf5383e /arch/x86/pci/visws.c
parent1be9baa09340bbe3329aab3bd0d41076f59c8f22 (diff)
PCI: x86: use generic pci_swizzle_interrupt_pin()
Use the generic pci_swizzle_interrupt_pin() instead of arch-specific code. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: hpa@zytor.com Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci/visws.c')
-rw-r--r--arch/x86/pci/visws.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/pci/visws.c b/arch/x86/pci/visws.c
index 16d0c0eb0d19..2c54e7e03f53 100644
--- a/arch/x86/pci/visws.c
+++ b/arch/x86/pci/visws.c
@@ -24,17 +24,12 @@ static void pci_visws_disable_irq(struct pci_dev *dev) { }
24 24
25unsigned int pci_bus0, pci_bus1; 25unsigned int pci_bus0, pci_bus1;
26 26
27static inline u8 bridge_swizzle(u8 pin, u8 slot)
28{
29 return (((pin - 1) + slot) % 4) + 1;
30}
31
32static u8 __init visws_swizzle(struct pci_dev *dev, u8 *pinp) 27static u8 __init visws_swizzle(struct pci_dev *dev, u8 *pinp)
33{ 28{
34 u8 pin = *pinp; 29 u8 pin = *pinp;
35 30
36 while (dev->bus->self) { /* Move up the chain of bridges. */ 31 while (dev->bus->self) { /* Move up the chain of bridges. */
37 pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)); 32 pin = pci_swizzle_interrupt_pin(dev, pin);
38 dev = dev->bus->self; 33 dev = dev->bus->self;
39 } 34 }
40 *pinp = pin; 35 *pinp = pin;