aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2009-06-02 04:31:03 -0400
committerBen Dooks <ben-linux@fluff.org>2009-06-16 18:30:12 -0400
commit3f1a567d8a4ed7a5d105bd049343606f5273b603 (patch)
tree463f13bdb05c88df5fbf7f26ec8bfe47fc1a98b8 /arch/arm/common
parentf25f0b9ca48848632f19e6616bd01550e3c0fc0e (diff)
[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.c8
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)
229{ 229{
230 struct vic_device *v = vic_from_irq(irq); 230 struct vic_device *v = vic_from_irq(irq);
231 unsigned int off = irq & 31; 231 unsigned int off = irq & 31;
232 u32 bit = 1 << off;
232 233
233 if (!v) 234 if (!v)
234 return -EINVAL; 235 return -EINVAL;
235 236
237 if (!(bit & v->resume_sources))
238 return -EINVAL;
239
236 if (on) 240 if (on)
237 v->resume_irqs |= 1 << off; 241 v->resume_irqs |= bit;
238 else 242 else
239 v->resume_irqs &= ~(1 << off); 243 v->resume_irqs &= ~bit;
240 244
241 return 0; 245 return 0;
242} 246}