public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] Fix compilation in locomo.c
@ 2005-07-26  6:30 Pavel Machek
  2005-09-04 10:33 ` Russell King
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2005-07-26  6:30 UTC (permalink / raw)
  To: rpurdie, lenz, kernel list, rmk

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>

---
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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-09-08 23:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-26  6:30 [patch] Fix compilation in locomo.c Pavel Machek
2005-09-04 10:33 ` Russell King
2005-09-06 14:11   ` Richard Purdie
2005-09-08 23:31     ` John Lenz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox