From 9ab3ab62a8ec7d832b1261338cc53f813bdcbf7e Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Sun, 4 Sep 2005 11:33:12 +0100 Subject: [PATCH] --- yaml --- r: 7092 b: refs/heads/master c: e24da5d316667a91b3a19b5761a211946ec649bb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/common/locomo.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index c43ab92853c7..a168bb5417b2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7db078be194469490caacac7d13bace38eaebdf5 +refs/heads/master: e24da5d316667a91b3a19b5761a211946ec649bb diff --git a/trunk/arch/arm/common/locomo.c b/trunk/arch/arm/common/locomo.c index 41f12658c8b4..30ab1c3e1d4d 100644 --- a/trunk/arch/arm/common/locomo.c +++ b/trunk/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);