File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -54,22 +54,15 @@ int irq_set_chip(unsigned int irq, const struct irq_chip *chip)
54
54
EXPORT_SYMBOL (irq_set_chip );
55
55
56
56
/**
57
- * irq_set_irq_type - set the irq trigger type for an irq
58
- * @irq: irq number
59
- * @type: IRQ_TYPE_{LEVEL,EDGE}_* value - see include/linux/irq.h
57
+ * irq_set_irq_type - set the irq trigger type for an irq
58
+ * @irq: irq number
59
+ * @type: IRQ_TYPE_{LEVEL,EDGE}_* value - see include/linux/irq.h
60
60
*/
61
61
int irq_set_irq_type (unsigned int irq , unsigned int type )
62
62
{
63
- unsigned long flags ;
64
- struct irq_desc * desc = irq_get_desc_buslock (irq , & flags , IRQ_GET_DESC_CHECK_GLOBAL );
65
- int ret = 0 ;
66
-
67
- if (!desc )
68
- return - EINVAL ;
69
-
70
- ret = __irq_set_trigger (desc , type );
71
- irq_put_desc_busunlock (desc , flags );
72
- return ret ;
63
+ scoped_irqdesc_get_and_buslock (irq , IRQ_GET_DESC_CHECK_GLOBAL )
64
+ return __irq_set_trigger (scoped_irqdesc , type );
65
+ return - EINVAL ;
73
66
}
74
67
EXPORT_SYMBOL (irq_set_irq_type );
75
68
You can’t perform that action at this time.
0 commit comments