@@ -84,34 +84,30 @@ int irq_set_handler_data(unsigned int irq, void *data)
84
84
EXPORT_SYMBOL (irq_set_handler_data );
85
85
86
86
/**
87
- * irq_set_msi_desc_off - set MSI descriptor data for an irq at offset
88
- * @irq_base: Interrupt number base
89
- * @irq_offset: Interrupt number offset
90
- * @entry: Pointer to MSI descriptor data
87
+ * irq_set_msi_desc_off - set MSI descriptor data for an irq at offset
88
+ * @irq_base: Interrupt number base
89
+ * @irq_offset: Interrupt number offset
90
+ * @entry: Pointer to MSI descriptor data
91
91
*
92
- * Set the MSI descriptor entry for an irq at offset
92
+ * Set the MSI descriptor entry for an irq at offset
93
93
*/
94
- int irq_set_msi_desc_off (unsigned int irq_base , unsigned int irq_offset ,
95
- struct msi_desc * entry )
94
+ int irq_set_msi_desc_off (unsigned int irq_base , unsigned int irq_offset , struct msi_desc * entry )
96
95
{
97
- unsigned long flags ;
98
- struct irq_desc * desc = irq_get_desc_lock (irq_base + irq_offset , & flags , IRQ_GET_DESC_CHECK_GLOBAL );
99
-
100
- if (!desc )
101
- return - EINVAL ;
102
- desc -> irq_common_data .msi_desc = entry ;
103
- if (entry && !irq_offset )
104
- entry -> irq = irq_base ;
105
- irq_put_desc_unlock (desc , flags );
106
- return 0 ;
96
+ scoped_irqdesc_get_and_lock (irq_base + irq_offset , IRQ_GET_DESC_CHECK_GLOBAL ) {
97
+ scoped_irqdesc -> irq_common_data .msi_desc = entry ;
98
+ if (entry && !irq_offset )
99
+ entry -> irq = irq_base ;
100
+ return 0 ;
101
+ }
102
+ return - EINVAL ;
107
103
}
108
104
109
105
/**
110
- * irq_set_msi_desc - set MSI descriptor data for an irq
111
- * @irq: Interrupt number
112
- * @entry: Pointer to MSI descriptor data
106
+ * irq_set_msi_desc - set MSI descriptor data for an irq
107
+ * @irq: Interrupt number
108
+ * @entry: Pointer to MSI descriptor data
113
109
*
114
- * Set the MSI descriptor entry for an irq
110
+ * Set the MSI descriptor entry for an irq
115
111
*/
116
112
int irq_set_msi_desc (unsigned int irq , struct msi_desc * entry )
117
113
{
0 commit comments