File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -67,22 +67,19 @@ int irq_set_irq_type(unsigned int irq, unsigned int type)
67
67
EXPORT_SYMBOL (irq_set_irq_type );
68
68
69
69
/**
70
- * irq_set_handler_data - set irq handler data for an irq
71
- * @irq: Interrupt number
72
- * @data: Pointer to interrupt specific data
70
+ * irq_set_handler_data - set irq handler data for an irq
71
+ * @irq: Interrupt number
72
+ * @data: Pointer to interrupt specific data
73
73
*
74
- * Set the hardware irq controller data for an irq
74
+ * Set the hardware irq controller data for an irq
75
75
*/
76
76
int irq_set_handler_data (unsigned int irq , void * data )
77
77
{
78
- unsigned long flags ;
79
- struct irq_desc * desc = irq_get_desc_lock (irq , & flags , 0 );
80
-
81
- if (!desc )
82
- return - EINVAL ;
83
- desc -> irq_common_data .handler_data = data ;
84
- irq_put_desc_unlock (desc , flags );
85
- return 0 ;
78
+ scoped_irqdesc_get_and_lock (irq , 0 ) {
79
+ scoped_irqdesc -> irq_common_data .handler_data = data ;
80
+ return 0 ;
81
+ }
82
+ return - EINVAL ;
86
83
}
87
84
EXPORT_SYMBOL (irq_set_handler_data );
88
85
You can’t perform that action at this time.
0 commit comments