linux/interrupt.h: allow "guard" notation to disable and reenable IRQ
Drivers often need to first disable an interrupt, carry out some action, and then reenable the interrupt. Introduce support for the "guard" notation for this so that the following is possible: ... scoped_cond_guard(mutex_intr, return -EINTR, &data->sysfs_mutex) { guard(disable_irq)(&client->irq); error = elan_acquire_baseline(data); if (error) return error; } ... Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/ZljAV6HjkPSEhWSw@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Showing
Please register or sign in to comment