diff options
author | Pavel Machek <pavel@suse.cz> | 2005-09-04 12:33:12 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-09-04 12:33:12 +0200 |
commit | e24da5d316667a91b3a19b5761a211946ec649bb (patch) | |
tree | d2a7e9dda426f98e43841c3ddae227f59cac8232 /arch/arm/common/locomo.c | |
parent | [ARM] Stack starts at THREAD_START_SP offset, not THREAD_SIZE-8 (diff) | |
download | linux-e24da5d316667a91b3a19b5761a211946ec649bb.tar.xz linux-e24da5d316667a91b3a19b5761a211946ec649bb.zip |
[ARM] Fix compilation in locomo.c
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>
Diffstat (limited to '')
-rw-r--r-- | arch/arm/common/locomo.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 41f12658c8b4..30ab1c3e1d4d 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c @@ -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); |