提交 e24da5d3 编写于 作者: P Pavel Machek 提交者: Russell King

[ARM] 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: NPavel Machek <pavel@suse.cz>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 7db078be
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册