@@ -941,35 +941,23 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle,
941
941
}
942
942
}
943
943
944
- void
945
- __irq_set_handler (unsigned int irq , irq_flow_handler_t handle , int is_chained ,
946
- const char * name )
944
+ void __irq_set_handler (unsigned int irq , irq_flow_handler_t handle , int is_chained ,
945
+ const char * name )
947
946
{
948
- unsigned long flags ;
949
- struct irq_desc * desc = irq_get_desc_buslock (irq , & flags , 0 );
950
-
951
- if (!desc )
952
- return ;
953
-
954
- __irq_do_set_handler (desc , handle , is_chained , name );
955
- irq_put_desc_busunlock (desc , flags );
947
+ scoped_irqdesc_get_and_lock (irq , 0 )
948
+ __irq_do_set_handler (scoped_irqdesc , handle , is_chained , name );
956
949
}
957
950
EXPORT_SYMBOL_GPL (__irq_set_handler );
958
951
959
- void
960
- irq_set_chained_handler_and_data (unsigned int irq , irq_flow_handler_t handle ,
961
- void * data )
952
+ void irq_set_chained_handler_and_data (unsigned int irq , irq_flow_handler_t handle ,
953
+ void * data )
962
954
{
963
- unsigned long flags ;
964
- struct irq_desc * desc = irq_get_desc_buslock ( irq , & flags , 0 ) ;
955
+ scoped_irqdesc_get_and_buslock ( irq , 0 ) {
956
+ struct irq_desc * desc = scoped_irqdesc ;
965
957
966
- if (!desc )
967
- return ;
968
-
969
- desc -> irq_common_data .handler_data = data ;
970
- __irq_do_set_handler (desc , handle , 1 , NULL );
971
-
972
- irq_put_desc_busunlock (desc , flags );
958
+ desc -> irq_common_data .handler_data = data ;
959
+ __irq_do_set_handler (desc , handle , 1 , NULL );
960
+ }
973
961
}
974
962
EXPORT_SYMBOL_GPL (irq_set_chained_handler_and_data );
975
963
0 commit comments