summaryrefslogtreecommitdiff
path: root/drivers/parisc/gsc.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-29 01:32:01 (GMT)
committerJeff Garzik <jgarzik@pobox.com>2005-10-29 01:32:01 (GMT)
commit5615ca7906aefbdc3318604c89db5931d0a25910 (patch)
treec34bcc7e314f49005ad88ac84c908128729c0329 /drivers/parisc/gsc.c
parent7a9f8f93d2dad38f30fbc79d8a1e6517373aa4b6 (diff)
parent9dfb7808fb05643b0d06df7411b94d9546696bf1 (diff)
downloadlinux-fsl-qoriq-5615ca7906aefbdc3318604c89db5931d0a25910.tar.xz
Merge branch 'upstream'
Diffstat (limited to 'drivers/parisc/gsc.c')
-rw-r--r--drivers/parisc/gsc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c
index af5e025..16d40f9 100644
--- a/drivers/parisc/gsc.c
+++ b/drivers/parisc/gsc.c
@@ -183,12 +183,20 @@ void gsc_asic_assign_irq(struct gsc_asic *asic, int local_irq, int *irqp)
*irqp = irq;
}
+static struct device *next_device(struct klist_iter *i)
+{
+ struct klist_node * n = klist_next(i);
+ return n ? container_of(n, struct device, knode_parent) : NULL;
+}
+
void gsc_fixup_irqs(struct parisc_device *parent, void *ctrl,
void (*choose_irq)(struct parisc_device *, void *))
{
struct device *dev;
+ struct klist_iter i;
- list_for_each_entry(dev, &parent->dev.children, node) {
+ klist_iter_init(&parent->dev.klist_children, &i);
+ while ((dev = next_device(&i))) {
struct parisc_device *padev = to_parisc_device(dev);
/* work-around for 715/64 and others which have parent
@@ -197,6 +205,7 @@ void gsc_fixup_irqs(struct parisc_device *parent, void *ctrl,
return gsc_fixup_irqs(padev, ctrl, choose_irq);
choose_irq(padev, ctrl);
}
+ klist_iter_exit(&i);
}
int gsc_common_setup(struct parisc_device *parent, struct gsc_asic *gsc_asic)