summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-gic-v3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/irqchip/irq-gic-v3.c')
-rw-r--r--drivers/irqchip/irq-gic-v3.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 1a146ccee701..6e508038f31b 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -238,7 +238,9 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
238 if (irq < 16) 238 if (irq < 16)
239 return -EINVAL; 239 return -EINVAL;
240 240
241 if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING) 241 /* SPIs have restrictions on the supported types */
242 if (irq >= 32 && type != IRQ_TYPE_LEVEL_HIGH &&
243 type != IRQ_TYPE_EDGE_RISING)
242 return -EINVAL; 244 return -EINVAL;
243 245
244 if (gic_irq_in_rdist(d)) { 246 if (gic_irq_in_rdist(d)) {
@@ -249,9 +251,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
249 rwp_wait = gic_dist_wait_for_rwp; 251 rwp_wait = gic_dist_wait_for_rwp;
250 } 252 }
251 253
252 gic_configure_irq(irq, type, base, rwp_wait); 254 return gic_configure_irq(irq, type, base, rwp_wait);
253
254 return 0;
255} 255}
256 256
257static u64 gic_mpidr_to_affinity(u64 mpidr) 257static u64 gic_mpidr_to_affinity(u64 mpidr)