Skip to content

Commit

Permalink
sh: intc: switch irq_desc iteration to new active IRQ iterator.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pmundt committed Oct 28, 2010
1 parent fb41a49 commit 63111a3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/sh/intc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down

0 comments on commit 63111a3

Please sign in to comment.