Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5582349 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Jesse Barnes
Browse files

PCI: sh: use generic INTx swizzle from PCI core



Use the generic pci_common_swizzle() instead of arch-specific code.

Note that pci_common_swizzle() loops based on dev->bus->self, not
dev->bus->parent as the sh simple_swizzle() did.  I think they
are equivalent for this purpose.

Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 67eed580
Loading
Loading
Loading
Loading
+1 −16
Original line number Original line Diff line number Diff line
@@ -21,21 +21,6 @@
#include <linux/init.h>
#include <linux/init.h>
#include <asm/io.h>
#include <asm/io.h>


static u8 __init simple_swizzle(struct pci_dev *dev, u8 *pinp)
{
	u8 pin = *pinp;

	while (dev->bus->parent) {
		pin = pci_swizzle_interrupt_pin(dev, pin);
		/* Move up the chain of bridges. */
		dev = dev->bus->self;
	}
	*pinp = pin;

	/* The slot is the slot of the last bridge. */
	return PCI_SLOT(dev->devfn);
}

static int __init pcibios_init(void)
static int __init pcibios_init(void)
{
{
	struct pci_channel *p;
	struct pci_channel *p;
@@ -56,7 +41,7 @@ static int __init pcibios_init(void)
		busno = bus->subordinate + 1;
		busno = bus->subordinate + 1;
	}
	}


	pci_fixup_irqs(simple_swizzle, pcibios_map_platform_irq);
	pci_fixup_irqs(pci_common_swizzle, pcibios_map_platform_irq);


	return 0;
	return 0;
}
}