genirq: Add IRQCHIP_SKIP_SET_WAKE flag
Some irq chips need the irq_set_wake() functionality, but do not require a irq_set_wake() callback. Instead of forcing an empty callback to be implemented add a flag which notes this fact. Check for the flag in set_irq_wake_real() and return success when set. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Thomas Gleixner
parent
ed585a6516
commit
60f96b41f7
@ -467,6 +467,9 @@ static int set_irq_wake_real(unsigned int irq, unsigned int on)
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
int ret = -ENXIO;
|
||||
|
||||
if (irq_desc_get_chip(desc)->flags & IRQCHIP_SKIP_SET_WAKE)
|
||||
return 0;
|
||||
|
||||
if (desc->irq_data.chip->irq_set_wake)
|
||||
ret = desc->irq_data.chip->irq_set_wake(&desc->irq_data, on);
|
||||
|
||||
|
Reference in New Issue
Block a user