Skip to content

Commit

Permalink
[ARM] Fix compilation in locomo.c
Browse files Browse the repository at this point in the history
Do not access children in struct device directly, use
device_for_each_child helper instead. It fixes compilation.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Pavel Machek authored and Russell King committed Sep 4, 2005
1 parent 7db078b commit e24da5d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions arch/arm/common/locomo.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,15 +651,15 @@ __locomo_probe(struct device *me, struct resource *mem, int irq)
return ret;
}

static void __locomo_remove(struct locomo *lchip)
static int locomo_remove_child(struct device *dev, void *data)
{
struct list_head *l, *n;

list_for_each_safe(l, n, &lchip->dev->children) {
struct device *d = list_to_dev(l);
device_unregister(dev);
return 0;
}

device_unregister(d);
}
static void __locomo_remove(struct locomo *lchip)
{
device_for_each_child(lchip->dev, NULL, locomo_remove_child);

if (lchip->irq != NO_IRQ) {
set_irq_chained_handler(lchip->irq, NULL);
Expand Down

0 comments on commit e24da5d

Please sign in to comment.