aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp/pm-pxa910.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mmp/pm-pxa910.c')
-rw-r--r--arch/arm/mach-mmp/pm-pxa910.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/arch/arm/mach-mmp/pm-pxa910.c b/arch/arm/mach-mmp/pm-pxa910.c
index 48981ca801a5..04c9daf9f8d7 100644
--- a/arch/arm/mach-mmp/pm-pxa910.c
+++ b/arch/arm/mach-mmp/pm-pxa910.c
@@ -27,22 +27,8 @@
27 27
28int pxa910_set_wake(struct irq_data *data, unsigned int on) 28int pxa910_set_wake(struct irq_data *data, unsigned int on)
29{ 29{
30 int irq = data->irq;
31 struct irq_desc *desc = irq_to_desc(data->irq);
32 uint32_t awucrm = 0, apcr = 0; 30 uint32_t awucrm = 0, apcr = 0;
33 31 int irq = data->irq;
34 if (unlikely(irq >= nr_irqs)) {
35 pr_err("IRQ nubmers are out of boundary!\n");
36 return -EINVAL;
37 }
38
39 if (on) {
40 if (desc->action)
41 desc->action->flags |= IRQF_NO_SUSPEND;
42 } else {
43 if (desc->action)
44 desc->action->flags &= ~IRQF_NO_SUSPEND;
45 }
46 32
47 /* setting wakeup sources */ 33 /* setting wakeup sources */
48 switch (irq) { 34 switch (irq) {
@@ -115,9 +101,11 @@ int pxa910_set_wake(struct irq_data *data, unsigned int on)
115 if (irq >= IRQ_GPIO_START && irq < IRQ_BOARD_START) { 101 if (irq >= IRQ_GPIO_START && irq < IRQ_BOARD_START) {
116 awucrm = MPMU_AWUCRM_WAKEUP(2); 102 awucrm = MPMU_AWUCRM_WAKEUP(2);
117 apcr |= MPMU_APCR_SLPWP2; 103 apcr |= MPMU_APCR_SLPWP2;
118 } else 104 } else {
105 /* FIXME: This should return a proper error code ! */
119 printk(KERN_ERR "Error: no defined wake up source irq: %d\n", 106 printk(KERN_ERR "Error: no defined wake up source irq: %d\n",
120 irq); 107 irq);
108 }
121 } 109 }
122 110
123 if (on) { 111 if (on) {