lkml.org 
[lkml]   [2005]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 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>

---
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-26 08:36    [W:0.148 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site