Commit 3f1a567d authored by Ben Dooks's avatar Ben Dooks

[ARM] VIC: Fix resume sources usage

The resume_mask wasn't being checked in vic_set_wake()
to see if the IRQ was a valid wakeup source.
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent f25f0b9c
...@@ -229,14 +229,18 @@ static int vic_set_wake(unsigned int irq, unsigned int on) ...@@ -229,14 +229,18 @@ static int vic_set_wake(unsigned int irq, unsigned int on)
{ {
struct vic_device *v = vic_from_irq(irq); struct vic_device *v = vic_from_irq(irq);
unsigned int off = irq & 31; unsigned int off = irq & 31;
u32 bit = 1 << off;
if (!v) if (!v)
return -EINVAL; return -EINVAL;
if (!(bit & v->resume_sources))
return -EINVAL;
if (on) if (on)
v->resume_irqs |= 1 << off; v->resume_irqs |= bit;
else else
v->resume_irqs &= ~(1 << off); v->resume_irqs &= ~bit;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment