@@ -972,38 +972,34 @@ EXPORT_SYMBOL_GPL(irq_set_chip_and_handler_name);
972
972
973
973
void irq_modify_status (unsigned int irq , unsigned long clr , unsigned long set )
974
974
{
975
- unsigned long flags , trigger , tmp ;
976
- struct irq_desc * desc = irq_get_desc_lock (irq , & flags , 0 );
977
-
978
- if (!desc )
979
- return ;
980
-
981
- /*
982
- * Warn when a driver sets the no autoenable flag on an already
983
- * active interrupt.
984
- */
985
- WARN_ON_ONCE (!desc -> depth && (set & _IRQ_NOAUTOEN ));
986
-
987
- irq_settings_clr_and_set (desc , clr , set );
975
+ scoped_irqdesc_get_and_lock (irq , 0 ) {
976
+ struct irq_desc * desc = scoped_irqdesc ;
977
+ unsigned long trigger , tmp ;
978
+ /*
979
+ * Warn when a driver sets the no autoenable flag on an already
980
+ * active interrupt.
981
+ */
982
+ WARN_ON_ONCE (!desc -> depth && (set & _IRQ_NOAUTOEN ));
988
983
989
- trigger = irqd_get_trigger_type ( & desc -> irq_data );
984
+ irq_settings_clr_and_set ( desc , clr , set );
990
985
991
- irqd_clear (& desc -> irq_data , IRQD_NO_BALANCING | IRQD_PER_CPU |
992
- IRQD_TRIGGER_MASK | IRQD_LEVEL );
993
- if (irq_settings_has_no_balance_set (desc ))
994
- irqd_set (& desc -> irq_data , IRQD_NO_BALANCING );
995
- if (irq_settings_is_per_cpu (desc ))
996
- irqd_set (& desc -> irq_data , IRQD_PER_CPU );
997
- if (irq_settings_is_level (desc ))
998
- irqd_set (& desc -> irq_data , IRQD_LEVEL );
986
+ trigger = irqd_get_trigger_type (& desc -> irq_data );
999
987
1000
- tmp = irq_settings_get_trigger_mask (desc );
1001
- if (tmp != IRQ_TYPE_NONE )
1002
- trigger = tmp ;
988
+ irqd_clear (& desc -> irq_data , IRQD_NO_BALANCING | IRQD_PER_CPU |
989
+ IRQD_TRIGGER_MASK | IRQD_LEVEL );
990
+ if (irq_settings_has_no_balance_set (desc ))
991
+ irqd_set (& desc -> irq_data , IRQD_NO_BALANCING );
992
+ if (irq_settings_is_per_cpu (desc ))
993
+ irqd_set (& desc -> irq_data , IRQD_PER_CPU );
994
+ if (irq_settings_is_level (desc ))
995
+ irqd_set (& desc -> irq_data , IRQD_LEVEL );
1003
996
1004
- irqd_set (& desc -> irq_data , trigger );
997
+ tmp = irq_settings_get_trigger_mask (desc );
998
+ if (tmp != IRQ_TYPE_NONE )
999
+ trigger = tmp ;
1005
1000
1006
- irq_put_desc_unlock (desc , flags );
1001
+ irqd_set (& desc -> irq_data , trigger );
1002
+ }
1007
1003
}
1008
1004
EXPORT_SYMBOL_GPL (irq_modify_status );
1009
1005
0 commit comments