File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -34,26 +34,22 @@ struct irqaction chained_action = {
34
34
};
35
35
36
36
/**
37
- * irq_set_chip - set the irq chip for an irq
38
- * @irq: irq number
39
- * @chip: pointer to irq chip description structure
37
+ * irq_set_chip - set the irq chip for an irq
38
+ * @irq: irq number
39
+ * @chip: pointer to irq chip description structure
40
40
*/
41
41
int irq_set_chip (unsigned int irq , const struct irq_chip * chip )
42
42
{
43
- unsigned long flags ;
44
- struct irq_desc * desc = irq_get_desc_lock (irq , & flags , 0 );
45
-
46
- if (!desc )
47
- return - EINVAL ;
43
+ int ret = - EINVAL ;
48
44
49
- desc -> irq_data . chip = ( struct irq_chip * )( chip ?: & no_irq_chip );
50
- irq_put_desc_unlock ( desc , flags );
51
- /*
52
- * For !CONFIG_SPARSE_IRQ make the irq show up in
53
- * allocated_irqs.
54
- */
55
- irq_mark_irq (irq );
56
- return 0 ;
45
+ scoped_irqdesc_get_and_lock ( irq , 0 ) {
46
+ scoped_irqdesc -> irq_data . chip = ( struct irq_chip * )( chip ?: & no_irq_chip );
47
+ ret = 0 ;
48
+ }
49
+ /* For !CONFIG_SPARSE_IRQ make the irq show up in allocated_irqs. */
50
+ if (! ret )
51
+ irq_mark_irq (irq );
52
+ return ret ;
57
53
}
58
54
EXPORT_SYMBOL (irq_set_chip );
59
55
You can’t perform that action at this time.
0 commit comments