mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
[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: Pavel Machek <pavel@suse.cz> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
7db078be19
commit
e24da5d316
1 changed files with 7 additions and 7 deletions
|
@ -651,15 +651,15 @@ __locomo_probe(struct device *me, struct resource *mem, int irq)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int locomo_remove_child(struct device *dev, void *data)
|
||||
{
|
||||
device_unregister(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __locomo_remove(struct locomo *lchip)
|
||||
{
|
||||
struct list_head *l, *n;
|
||||
|
||||
list_for_each_safe(l, n, &lchip->dev->children) {
|
||||
struct device *d = list_to_dev(l);
|
||||
|
||||
device_unregister(d);
|
||||
}
|
||||
device_for_each_child(lchip->dev, NULL, locomo_remove_child);
|
||||
|
||||
if (lchip->irq != NO_IRQ) {
|
||||
set_irq_chained_handler(lchip->irq, NULL);
|
||||
|
|
Loading…
Reference in a new issue