diff options
| -rw-r--r-- | arch/arm/common/sa1111.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 21fce3414ed1..38c2eb667eb9 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
| @@ -721,16 +721,17 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
| 721 | return ret; | 721 | return ret; |
| 722 | } | 722 | } |
| 723 | 723 | ||
| 724 | static int sa1111_remove_one(struct device *dev, void *data) | ||
| 725 | { | ||
| 726 | device_unregister(dev); | ||
| 727 | return 0; | ||
| 728 | } | ||
| 729 | |||
| 724 | static void __sa1111_remove(struct sa1111 *sachip) | 730 | static void __sa1111_remove(struct sa1111 *sachip) |
| 725 | { | 731 | { |
| 726 | struct list_head *l, *n; | ||
| 727 | void __iomem *irqbase = sachip->base + SA1111_INTC; | 732 | void __iomem *irqbase = sachip->base + SA1111_INTC; |
| 728 | 733 | ||
| 729 | list_for_each_safe(l, n, &sachip->dev->children) { | 734 | device_for_each_child(sachip->dev, NULL, sa1111_remove_one); |
| 730 | struct device *d = list_to_dev(l); | ||
| 731 | |||
| 732 | device_unregister(d); | ||
| 733 | } | ||
| 734 | 735 | ||
| 735 | /* disable all IRQs */ | 736 | /* disable all IRQs */ |
| 736 | sa1111_writel(0, irqbase + SA1111_INTEN0); | 737 | sa1111_writel(0, irqbase + SA1111_INTEN0); |
