diff options
Diffstat (limited to 'include/linux/irqdesc.h')
-rw-r--r-- | include/linux/irqdesc.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index a72bfd94ea10..624a668e61f1 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -190,6 +190,47 @@ __irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip, | |||
190 | desc->name = name; | 190 | desc->name = name; |
191 | } | 191 | } |
192 | 192 | ||
193 | /** | ||
194 | * irq_set_handler_locked - Set irq handler from a locked region | ||
195 | * @data: Pointer to the irq_data structure which identifies the irq | ||
196 | * @handler: Flow control handler function for this interrupt | ||
197 | * | ||
198 | * Sets the handler in the irq descriptor associated to @data. | ||
199 | * | ||
200 | * Must be called with irq_desc locked and valid parameters. Typical | ||
201 | * call site is the irq_set_type() callback. | ||
202 | */ | ||
203 | static inline void irq_set_handler_locked(struct irq_data *data, | ||
204 | irq_flow_handler_t handler) | ||
205 | { | ||
206 | struct irq_desc *desc = irq_data_to_desc(data); | ||
207 | |||
208 | desc->handle_irq = handler; | ||
209 | } | ||
210 | |||
211 | /** | ||
212 | * irq_set_chip_handler_name_locked - Set chip, handler and name from a locked region | ||
213 | * @data: Pointer to the irq_data structure for which the chip is set | ||
214 | * @chip: Pointer to the new irq chip | ||
215 | * @handler: Flow control handler function for this interrupt | ||
216 | * @name: Name of the interrupt | ||
217 | * | ||
218 | * Replace the irq chip at the proper hierarchy level in @data and | ||
219 | * sets the handler and name in the associated irq descriptor. | ||
220 | * | ||
221 | * Must be called with irq_desc locked and valid parameters. | ||
222 | */ | ||
223 | static inline void | ||
224 | irq_set_chip_handler_name_locked(struct irq_data *data, struct irq_chip *chip, | ||
225 | irq_flow_handler_t handler, const char *name) | ||
226 | { | ||
227 | struct irq_desc *desc = irq_data_to_desc(data); | ||
228 | |||
229 | desc->handle_irq = handler; | ||
230 | desc->name = name; | ||
231 | data->chip = chip; | ||
232 | } | ||
233 | |||
193 | static inline int irq_balancing_disabled(unsigned int irq) | 234 | static inline int irq_balancing_disabled(unsigned int irq) |
194 | { | 235 | { |
195 | struct irq_desc *desc; | 236 | struct irq_desc *desc; |