summaryrefslogtreecommitdiffstats
path: root/kernel/irq/manage.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq/manage.c')
-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)) ||