[patch] Fix compilation in locomo.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do not access children in struct device directly, use
device_for_each_child helper instead. It fixes compilation.

Signed-off-by: Pavel Machek <[email protected]>

---
commit 3d7f15c66bc66c480d468e2c4d623949bba0d41f
tree 9734f5a58c31dade74b1b35c1ce0b0d6d44da589
parent 6cd7322dce560001570713269630390754881e5d
author <pavel@amd.(none)> Tue, 26 Jul 2005 08:29:38 +0200
committer <pavel@amd.(none)> Tue, 26 Jul 2005 08:29:38 +0200

 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
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -651,15 +651,15 @@ __locomo_probe(struct device *me, struct
 	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);

-- 
teflon -- maybe it is a trademark, but it should not be.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux