aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 08aedd5875b0..33adf323f064 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -27,20 +27,15 @@ static int pci_msi_enable = 1;
27 27
28/* Arch hooks */ 28/* Arch hooks */
29 29
30int __attribute__ ((weak)) 30#ifndef arch_msi_check_device
31arch_msi_check_device(struct pci_dev *dev, int nvec, int type) 31int arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
32{ 32{
33 return 0; 33 return 0;
34} 34}
35#endif
35 36
36int __attribute__ ((weak)) 37#ifndef arch_setup_msi_irqs
37arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *entry) 38int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
38{
39 return 0;
40}
41
42int __attribute__ ((weak))
43arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
44{ 39{
45 struct msi_desc *entry; 40 struct msi_desc *entry;
46 int ret; 41 int ret;
@@ -53,14 +48,10 @@ arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
53 48
54 return 0; 49 return 0;
55} 50}
51#endif
56 52
57void __attribute__ ((weak)) arch_teardown_msi_irq(unsigned int irq) 53#ifndef arch_teardown_msi_irqs
58{ 54void arch_teardown_msi_irqs(struct pci_dev *dev)
59 return;
60}
61
62void __attribute__ ((weak))
63arch_teardown_msi_irqs(struct pci_dev *dev)
64{ 55{
65 struct msi_desc *entry; 56 struct msi_desc *entry;
66 57
@@ -69,6 +60,7 @@ arch_teardown_msi_irqs(struct pci_dev *dev)
69 arch_teardown_msi_irq(entry->irq); 60 arch_teardown_msi_irq(entry->irq);
70 } 61 }
71} 62}
63#endif
72 64
73static void __msi_set_enable(struct pci_dev *dev, int pos, int enable) 65static void __msi_set_enable(struct pci_dev *dev, int pos, int enable)
74{ 66{