diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2014-09-07 14:57:54 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-10-01 14:21:14 -0400 |
commit | 3930115e0dd67f61b3b1882c7a34d0baeff1bb4c (patch) | |
tree | f2f53658ddbf84b6175c7f89869e4aecf468bb71 /drivers/irqchip/irq-armada-370-xp.c | |
parent | 6b2fd7efeb888fa781c1f767de6c36497ac1596b (diff) |
irqchip: armada-370-xp: Remove arch_msi_check_device()
Move MSI checks from arch_msi_check_device() to arch_setup_msi_irqs().
This makes the code more compact and allows removing
arch_msi_check_device() from generic MSI code.
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
CC: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/irqchip/irq-armada-370-xp.c')
-rw-r--r-- | drivers/irqchip/irq-armada-370-xp.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 574aba0eba4e..df60eabaf49e 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c | |||
@@ -136,6 +136,10 @@ static int armada_370_xp_setup_msi_irq(struct msi_chip *chip, | |||
136 | struct msi_msg msg; | 136 | struct msi_msg msg; |
137 | int virq, hwirq; | 137 | int virq, hwirq; |
138 | 138 | ||
139 | /* We support MSI, but not MSI-X */ | ||
140 | if (desc->msi_attrib.is_msix) | ||
141 | return -EINVAL; | ||
142 | |||
139 | hwirq = armada_370_xp_alloc_msi(); | 143 | hwirq = armada_370_xp_alloc_msi(); |
140 | if (hwirq < 0) | 144 | if (hwirq < 0) |
141 | return hwirq; | 145 | return hwirq; |
@@ -166,15 +170,6 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip, | |||
166 | armada_370_xp_free_msi(hwirq); | 170 | armada_370_xp_free_msi(hwirq); |
167 | } | 171 | } |
168 | 172 | ||
169 | static int armada_370_xp_check_msi_device(struct msi_chip *chip, struct pci_dev *dev, | ||
170 | int nvec, int type) | ||
171 | { | ||
172 | /* We support MSI, but not MSI-X */ | ||
173 | if (type == PCI_CAP_ID_MSI) | ||
174 | return 0; | ||
175 | return -EINVAL; | ||
176 | } | ||
177 | |||
178 | static struct irq_chip armada_370_xp_msi_irq_chip = { | 173 | static struct irq_chip armada_370_xp_msi_irq_chip = { |
179 | .name = "armada_370_xp_msi_irq", | 174 | .name = "armada_370_xp_msi_irq", |
180 | .irq_enable = unmask_msi_irq, | 175 | .irq_enable = unmask_msi_irq, |
@@ -213,7 +208,6 @@ static int armada_370_xp_msi_init(struct device_node *node, | |||
213 | 208 | ||
214 | msi_chip->setup_irq = armada_370_xp_setup_msi_irq; | 209 | msi_chip->setup_irq = armada_370_xp_setup_msi_irq; |
215 | msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq; | 210 | msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq; |
216 | msi_chip->check_device = armada_370_xp_check_msi_device; | ||
217 | msi_chip->of_node = node; | 211 | msi_chip->of_node = node; |
218 | 212 | ||
219 | armada_370_xp_msi_domain = | 213 | armada_370_xp_msi_domain = |