From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Helgaas Subject: [PATCH 6/6] PCI: x86/visws: use generic INTx swizzle from PCI core Date: Tue, 16 Dec 2008 21:37:20 -0700 Message-ID: <20081217043720.8372.22899.stgit@bob.kio> References: <20081217043443.8372.28890.stgit@bob.kio> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20081217043443.8372.28890.stgit@bob.kio> Sender: linux-pci-owner@vger.kernel.org To: Jesse Barnes Cc: linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, Ivan Kokshaysky , Russell King , Ralf Baechle , Paul Mundt , Thomas Gleixner , Ingo Molnar , hpa@zytor.com List-Id: linux-arch.vger.kernel.org Use the generic pci_common_swizzle() instead of arch-specific code. Signed-off-by: Bjorn Helgaas --- arch/x86/pci/visws.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/arch/x86/pci/visws.c b/arch/x86/pci/visws.c index 6b5ed3d..fd7b76f 100644 --- a/arch/x86/pci/visws.c +++ b/arch/x86/pci/visws.c @@ -25,19 +25,6 @@ static void pci_visws_disable_irq(struct pci_dev *dev) { } unsigned int pci_bus0, pci_bus1; -static u8 __init visws_swizzle(struct pci_dev *dev, u8 *pinp) -{ - u8 pin = *pinp; - - while (dev->bus->self) { /* Move up the chain of bridges. */ - pin = pci_swizzle_interrupt_pin(dev, pin); - dev = dev->bus->self; - } - *pinp = pin; - - return PCI_SLOT(dev->devfn); -} - static int __init visws_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { int irq, bus = dev->bus->number; @@ -102,7 +89,7 @@ int __init pci_visws_init(void) raw_pci_ops = &pci_direct_conf1; pci_scan_bus_with_sysdata(pci_bus0); pci_scan_bus_with_sysdata(pci_bus1); - pci_fixup_irqs(visws_swizzle, visws_map_irq); + pci_fixup_irqs(pci_common_swizzle, visws_map_irq); pcibios_resource_survey(); return 0; } From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from g4t0016.houston.hp.com ([15.201.24.19]:30462 "EHLO g4t0016.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751473AbYLQEhV (ORCPT ); Tue, 16 Dec 2008 23:37:21 -0500 From: Bjorn Helgaas Subject: [PATCH 6/6] PCI: x86/visws: use generic INTx swizzle from PCI core Date: Tue, 16 Dec 2008 21:37:20 -0700 Message-ID: <20081217043720.8372.22899.stgit@bob.kio> In-Reply-To: <20081217043443.8372.28890.stgit@bob.kio> References: <20081217043443.8372.28890.stgit@bob.kio> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Jesse Barnes Cc: linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, Ivan Kokshaysky , Russell King , Ralf Baechle , Paul Mundt , Thomas Gleixner , Ingo Molnar , hpa@zytor.com Message-ID: <20081217043720.Do2rbiVxwVNO1b0lZLKs_zifOif_LpTzahOBDONf6i8@z> Use the generic pci_common_swizzle() instead of arch-specific code. Signed-off-by: Bjorn Helgaas --- arch/x86/pci/visws.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/arch/x86/pci/visws.c b/arch/x86/pci/visws.c index 6b5ed3d..fd7b76f 100644 --- a/arch/x86/pci/visws.c +++ b/arch/x86/pci/visws.c @@ -25,19 +25,6 @@ static void pci_visws_disable_irq(struct pci_dev *dev) { } unsigned int pci_bus0, pci_bus1; -static u8 __init visws_swizzle(struct pci_dev *dev, u8 *pinp) -{ - u8 pin = *pinp; - - while (dev->bus->self) { /* Move up the chain of bridges. */ - pin = pci_swizzle_interrupt_pin(dev, pin); - dev = dev->bus->self; - } - *pinp = pin; - - return PCI_SLOT(dev->devfn); -} - static int __init visws_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { int irq, bus = dev->bus->number; @@ -102,7 +89,7 @@ int __init pci_visws_init(void) raw_pci_ops = &pci_direct_conf1; pci_scan_bus_with_sysdata(pci_bus0); pci_scan_bus_with_sysdata(pci_bus1); - pci_fixup_irqs(visws_swizzle, visws_map_irq); + pci_fixup_irqs(pci_common_swizzle, visws_map_irq); pcibios_resource_survey(); return 0; }