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 @@ -115,22 +115,19 @@ int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry)
115
115
}
116
116
117
117
/**
118
- * irq_set_chip_data - set irq chip data for an irq
119
- * @irq: Interrupt number
120
- * @data: Pointer to chip specific data
118
+ * irq_set_chip_data - set irq chip data for an irq
119
+ * @irq: Interrupt number
120
+ * @data: Pointer to chip specific data
121
121
*
122
- * Set the hardware irq chip data for an irq
122
+ * Set the hardware irq chip data for an irq
123
123
*/
124
124
int irq_set_chip_data (unsigned int irq , void * data )
125
125
{
126
- unsigned long flags ;
127
- struct irq_desc * desc = irq_get_desc_lock (irq , & flags , 0 );
128
-
129
- if (!desc )
130
- return - EINVAL ;
131
- desc -> irq_data .chip_data = data ;
132
- irq_put_desc_unlock (desc , flags );
133
- return 0 ;
126
+ scoped_irqdesc_get_and_lock (irq , 0 ) {
127
+ scoped_irqdesc -> irq_data .chip_data = data ;
128
+ return 0 ;
129
+ }
130
+ return - EINVAL ;
134
131
}
135
132
EXPORT_SYMBOL (irq_set_chip_data );
136
133
You can’t perform that action at this time.
0 commit comments