summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2015-01-16 20:04:56 +0300
committerOlof Johansson <olof@lixom.net>2015-01-22 02:15:14 +0300
commit0495cb75ed301bbe6b01346cbf8bc5244a2948b2 (patch)
tree78f784a944fd9a3780b5a78eafe26910f8c1b516 /drivers/of
parent4d4ac7aa901d43314a7642e3039be4daeb7657ba (diff)
downloadlinux-0495cb75ed301bbe6b01346cbf8bc5244a2948b2.tar.xz
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')
-rw-r--r--drivers/of/platform.c1
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)
amba_device_unregister(to_amba_device(dev));
#endif
+ of_dma_deconfigure(dev);
of_node_clear_flag(dev->of_node, OF_POPULATED);
of_node_clear_flag(dev->of_node, OF_POPULATED_BUS);
return 0;