diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-10 12:30:46 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-05-13 18:11:56 +0200 |
commit | b28626da344ea3d9f9c518a6c082db9306f534ff (patch) | |
tree | 12c6ae8fbb146b7cb0b20e8f0f19be90ca1cbb3e /arch | |
parent | ARM: PCI: footbridge: provide a 'no swizzle' function for CATS (diff) | |
download | linux-b28626da344ea3d9f9c518a6c082db9306f534ff.tar.xz linux-b28626da344ea3d9f9c518a6c082db9306f534ff.zip |
ARM: PCI: integrator: use common PCI swizzle
The Integrator swizzle function is almost the same as the standard PCI
swizzle, except for an initial check for pin = 0. Make the integrator
swizzle function a wrapper around the standard PCI swizzle function so
we preseve this behaviour while using common code.
[fix to use pci_std_swizzle from Linus Walleij]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-integrator/pci.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c index f1ca9c122861..f304deac8d05 100644 --- a/arch/arm/mach-integrator/pci.c +++ b/arch/arm/mach-integrator/pci.c @@ -70,21 +70,10 @@ */ static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp) { - int pin = *pinp; + if (*pinp == 0) + *pinp = 1; - if (pin == 0) - pin = 1; - - while (dev->bus->self) { - pin = pci_swizzle_interrupt_pin(dev, pin); - /* - * move up the chain of bridges, swizzling as we go. - */ - dev = dev->bus->self; - } - *pinp = pin; - - return PCI_SLOT(dev->devfn); + return pci_common_swizzle(dev, pinp); } static int irq_tab[4] __initdata = { |