From: Greg Kroah-Hartman Date: Fri, 30 Mar 2018 08:56:51 +0000 (+0200) Subject: Revert "genirq: Use irqd_get_trigger_type to compare the trigger type for shared... X-Git-Tag: v3.18.103~72 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ab380698a5301fa8ccf995d946351cf4047ee52;p=thirdparty%2Fkernel%2Fstable.git Revert "genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs" This reverts commit 093c265afffb0a91a7611c3bb74d0883731a807b which is commit 382bd4de61827dbaaf5fb4fb7b1f4be4a86505e7 upstream. It causes too many problems with the stable tree, and would require too many other things to be backported, so just revert it. Reported-by: Guenter Roeck Cc: Thomas Gleixner Cc: Hans de Goede Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 5f23a04789db4..e7ef539c56d97 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -1058,10 +1058,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) * set the trigger type must match. Also all must * agree on ONESHOT. */ - unsigned int oldtype = irqd_get_trigger_type(&desc->irq_data); - if (!((old->flags & new->flags) & IRQF_SHARED) || - (oldtype != (new->flags & IRQF_TRIGGER_MASK)) || + ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK) || ((old->flags ^ new->flags) & IRQF_ONESHOT)) goto mismatch;