From e9870c4c0aef94580e28be11a1c6246dcabbe528 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 7 May 2007 23:28:50 -0700 Subject: [SPARC64]: Move {setup,teardown}_msi_irq into pci_pbm_info. Signed-off-by: David S. Miller --- arch/sparc64/kernel/pci.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'arch/sparc64/kernel/pci.c') diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index b583deb05062..4d30d57c4619 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -1092,17 +1092,12 @@ EXPORT_SYMBOL(pci_domain_nr); int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) { struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; - struct pci_controller_info *p = pbm->parent; - int virt_irq, err; + int virt_irq; - if (!pbm->msi_num || !p->setup_msi_irq) + if (!pbm->setup_msi_irq) return -EINVAL; - err = p->setup_msi_irq(&virt_irq, pdev, desc); - if (err) - return err; - - return 0; + return pbm->setup_msi_irq(&virt_irq, pdev, desc); } void arch_teardown_msi_irq(unsigned int virt_irq) @@ -1110,12 +1105,11 @@ void arch_teardown_msi_irq(unsigned int virt_irq) struct msi_desc *entry = get_irq_msi(virt_irq); struct pci_dev *pdev = entry->dev; struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; - struct pci_controller_info *p = pbm->parent; - if (!pbm->msi_num || !p->setup_msi_irq) + if (!pbm->teardown_msi_irq) return; - return p->teardown_msi_irq(virt_irq, pdev); + return pbm->teardown_msi_irq(virt_irq, pdev); } #endif /* !(CONFIG_PCI_MSI) */ -- cgit v1.2.2