]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] Fix compilation in locomo.c
authorPavel Machek <pavel@suse.cz>
Sun, 4 Sep 2005 10:33:12 +0000 (11:33 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 4 Sep 2005 10:33:12 +0000 (11:33 +0100)
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>
arch/arm/common/locomo.c

index 41f12658c8b47a2862605b39ed78fbdb6c8a55e5..30ab1c3e1d4de578d1f7acb9c57b395d0784675a 100644 (file)
@@ -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);