summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-11-14 05:23:05 -0500
committerThomas Gleixner <tglx@linutronix.de>2017-11-14 05:23:05 -0500
commit41cc30412d6692c25506bf2d4e65c4364c70c10a (patch)
treed9adeb9c94a54998002d46aeebb99f86f1232016 /kernel/irq
parentb29c6ef7bb1257853c1e31616d84f55e561cf631 (diff)
parent29f411399aaa2e53882858e01d21981f3c301e2a (diff)
Merge tag 'irqchip-4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Pull irqchip updates for 4.15, take #4 from Marc Zyngier - A core irq fix for legacy cases where the irq trigger is not reported by firmware - A couple of GICv3/4 fixes (Kconfig, of-node refcount, error handling) - Trivial pr_err fixes
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/manage.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 2ff1c0c82fc9..0f922729bab9 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1246,7 +1246,18 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
1246 * set the trigger type must match. Also all must 1246 * set the trigger type must match. Also all must
1247 * agree on ONESHOT. 1247 * agree on ONESHOT.
1248 */ 1248 */
1249 unsigned int oldtype = irqd_get_trigger_type(&desc->irq_data); 1249 unsigned int oldtype;
1250
1251 /*
1252 * If nobody did set the configuration before, inherit
1253 * the one provided by the requester.
1254 */
1255 if (irqd_trigger_type_was_set(&desc->irq_data)) {
1256 oldtype = irqd_get_trigger_type(&desc->irq_data);
1257 } else {
1258 oldtype = new->flags & IRQF_TRIGGER_MASK;
1259 irqd_set_trigger_type(&desc->irq_data, oldtype);
1260 }
1250 1261
1251 if (!((old->flags & new->flags) & IRQF_SHARED) || 1262 if (!((old->flags & new->flags) & IRQF_SHARED) ||
1252 (oldtype != (new->flags & IRQF_TRIGGER_MASK)) || 1263 (oldtype != (new->flags & IRQF_TRIGGER_MASK)) ||