diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-29 01:32:01 (GMT) |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-29 01:32:01 (GMT) |
commit | 5615ca7906aefbdc3318604c89db5931d0a25910 (patch) | |
tree | c34bcc7e314f49005ad88ac84c908128729c0329 /drivers/parisc/gsc.c | |
parent | 7a9f8f93d2dad38f30fbc79d8a1e6517373aa4b6 (diff) | |
parent | 9dfb7808fb05643b0d06df7411b94d9546696bf1 (diff) | |
download | linux-fsl-qoriq-5615ca7906aefbdc3318604c89db5931d0a25910.tar.xz |
Merge branch 'upstream'
Diffstat (limited to 'drivers/parisc/gsc.c')
-rw-r--r-- | drivers/parisc/gsc.c | 11 |
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) |