diff options
author | Ben Dooks <ben-linux@fluff.org> | 2009-06-02 09:31:03 +0100 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-06-16 23:30:12 +0100 |
commit | 3f1a567d8a4ed7a5d105bd049343606f5273b603 (patch) | |
tree | 463f13bdb05c88df5fbf7f26ec8bfe47fc1a98b8 /arch/arm/common | |
parent | f25f0b9ca48848632f19e6616bd01550e3c0fc0e (diff) | |
download | blackbird-op-linux-3f1a567d8a4ed7a5d105bd049343606f5273b603.tar.gz blackbird-op-linux-3f1a567d8a4ed7a5d105bd049343606f5273b603.zip |
[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: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/vic.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index 887c6eb3a18a..6ed89836e908 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c @@ -229,14 +229,18 @@ static int vic_set_wake(unsigned int irq, unsigned int on) { struct vic_device *v = vic_from_irq(irq); unsigned int off = irq & 31; + u32 bit = 1 << off; if (!v) return -EINVAL; + if (!(bit & v->resume_sources)) + return -EINVAL; + if (on) - v->resume_irqs |= 1 << off; + v->resume_irqs |= bit; else - v->resume_irqs &= ~(1 << off); + v->resume_irqs &= ~bit; return 0; } |