diff options
author | Will Deacon <will.deacon@arm.com> | 2015-01-16 12:04:56 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2015-01-21 18:15:14 -0500 |
commit | 0495cb75ed301bbe6b01346cbf8bc5244a2948b2 (patch) | |
tree | 78f784a944fd9a3780b5a78eafe26910f8c1b516 /drivers/of/platform.c | |
parent | 4d4ac7aa901d43314a7642e3039be4daeb7657ba (diff) |
of/platform: teardown DMA mappings on device destruction
Now that we can create and attach to IOMMU domains via of_dma_configure,
make sure we give the architecture a chance to tear them down when a
platform or amba device is destroyed.
Acked-by: Rob Herring <robh@kernel.org>
Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r-- | drivers/of/platform.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 5b33c6a21807..3f61d668ded7 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
@@ -526,6 +526,7 @@ static int of_platform_device_destroy(struct device *dev, void *data) | |||
526 | amba_device_unregister(to_amba_device(dev)); | 526 | amba_device_unregister(to_amba_device(dev)); |
527 | #endif | 527 | #endif |
528 | 528 | ||
529 | of_dma_deconfigure(dev); | ||
529 | of_node_clear_flag(dev->of_node, OF_POPULATED); | 530 | of_node_clear_flag(dev->of_node, OF_POPULATED); |
530 | of_node_clear_flag(dev->of_node, OF_POPULATED_BUS); | 531 | of_node_clear_flag(dev->of_node, OF_POPULATED_BUS); |
531 | return 0; | 532 | return 0; |