diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-05-08 02:28:50 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-05-08 19:41:36 -0400 |
commit | e9870c4c0aef94580e28be11a1c6246dcabbe528 (patch) | |
tree | 4f06f3afeb9fb84e561e1f624b7ea0585fd0a94c /arch/sparc64/kernel/pci.c | |
parent | f1cd8de2c951e206b57fd76aff279cf13ea25815 (diff) |
[SPARC64]: Move {setup,teardown}_msi_irq into pci_pbm_info.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci.c')
-rw-r--r-- | arch/sparc64/kernel/pci.c | 16 |
1 files changed, 5 insertions, 11 deletions
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); | |||
1092 | int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) | 1092 | int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) |
1093 | { | 1093 | { |
1094 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; | 1094 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; |
1095 | struct pci_controller_info *p = pbm->parent; | 1095 | int virt_irq; |
1096 | int virt_irq, err; | ||
1097 | 1096 | ||
1098 | if (!pbm->msi_num || !p->setup_msi_irq) | 1097 | if (!pbm->setup_msi_irq) |
1099 | return -EINVAL; | 1098 | return -EINVAL; |
1100 | 1099 | ||
1101 | err = p->setup_msi_irq(&virt_irq, pdev, desc); | 1100 | return pbm->setup_msi_irq(&virt_irq, pdev, desc); |
1102 | if (err) | ||
1103 | return err; | ||
1104 | |||
1105 | return 0; | ||
1106 | } | 1101 | } |
1107 | 1102 | ||
1108 | void arch_teardown_msi_irq(unsigned int virt_irq) | 1103 | void arch_teardown_msi_irq(unsigned int virt_irq) |
@@ -1110,12 +1105,11 @@ void arch_teardown_msi_irq(unsigned int virt_irq) | |||
1110 | struct msi_desc *entry = get_irq_msi(virt_irq); | 1105 | struct msi_desc *entry = get_irq_msi(virt_irq); |
1111 | struct pci_dev *pdev = entry->dev; | 1106 | struct pci_dev *pdev = entry->dev; |
1112 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; | 1107 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; |
1113 | struct pci_controller_info *p = pbm->parent; | ||
1114 | 1108 | ||
1115 | if (!pbm->msi_num || !p->setup_msi_irq) | 1109 | if (!pbm->teardown_msi_irq) |
1116 | return; | 1110 | return; |
1117 | 1111 | ||
1118 | return p->teardown_msi_irq(virt_irq, pdev); | 1112 | return pbm->teardown_msi_irq(virt_irq, pdev); |
1119 | } | 1113 | } |
1120 | #endif /* !(CONFIG_PCI_MSI) */ | 1114 | #endif /* !(CONFIG_PCI_MSI) */ |
1121 | 1115 | ||