mirror of
https://github.com/torvalds/linux.git
synced 2025-11-30 23:16:01 +07:00
genirq/manage: Rework enable_irq()
Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/all/20250429065422.071157729@linutronix.de
This commit is contained in:
@@ -789,18 +789,13 @@ void __enable_irq(struct irq_desc *desc)
|
||||
*/
|
||||
void enable_irq(unsigned int irq)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL);
|
||||
scoped_irqdesc_get_and_lock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
|
||||
struct irq_desc *desc = scoped_irqdesc;
|
||||
|
||||
if (!desc)
|
||||
return;
|
||||
if (WARN(!desc->irq_data.chip,
|
||||
KERN_ERR "enable_irq before setup/request_irq: irq %u\n", irq))
|
||||
goto out;
|
||||
|
||||
__enable_irq(desc);
|
||||
out:
|
||||
irq_put_desc_busunlock(desc, flags);
|
||||
if (WARN(!desc->irq_data.chip, "enable_irq before setup/request_irq: irq %u\n", irq))
|
||||
return;
|
||||
__enable_irq(desc);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(enable_irq);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user