summaryrefslogtreecommitdiff
path: root/drivers/sh/intc
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-10-28 06:36:31 +0400
committerPaul Mundt <lethal@linux-sh.org>2010-10-28 06:36:31 +0400
commit63111a3a70fb4d80e3b54ed75f13795e98f7a467 (patch)
treeb20d7ae26df0dbac361de76c6492f84545bb33a4 /drivers/sh/intc
parentfb41a49d96cd0fb6c63362ff1c8de22e9e7399af (diff)
downloadlinux-63111a3a70fb4d80e3b54ed75f13795e98f7a467.tar.xz
sh: intc: switch irq_desc iteration to new active IRQ iterator.
There's no need to iterative over every single irq_desc when we can already work out which IRQs have a backing descriptor via the shiny new for_each_active_irq(). Switch to that instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/sh/intc')
-rw-r--r--drivers/sh/intc/core.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
index 338fad2a3fa4..873a99ff8f64 100644
--- a/drivers/sh/intc/core.c
+++ b/drivers/sh/intc/core.c
@@ -403,11 +403,8 @@ static int intc_suspend(struct sys_device *dev, pm_message_t state)
if (d->state.event != PM_EVENT_FREEZE)
break;
- for_each_irq_nr(irq) {
+ for_each_active_irq(irq) {
desc = irq_to_desc(irq);
- if (!desc)
- continue;
-
data = irq_get_irq_data(irq);
chip = irq_data_get_irq_chip(data);
@@ -428,11 +425,8 @@ static int intc_suspend(struct sys_device *dev, pm_message_t state)
break;
case PM_EVENT_SUSPEND:
/* enable wakeup irqs belonging to this intc controller */
- for_each_irq_nr(irq) {
+ for_each_active_irq(irq) {
desc = irq_to_desc(irq);
- if (!desc)
- continue;
-
data = irq_get_irq_data(irq);
chip = irq_data_get_irq_chip(data);