summaryrefslogtreecommitdiffstats
path: root/drivers/of/platform.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2015-01-16 18:04:56 +0100
committerOlof Johansson <olof@lixom.net>2015-01-22 00:15:14 +0100
commit0495cb75ed301bbe6b01346cbf8bc5244a2948b2 (patch)
tree78f784a944fd9a3780b5a78eafe26910f8c1b516 /drivers/of/platform.c
parentMerge tag 'renesas-sh73a0-ccf2-for-v3.20' of git://git.kernel.org/pub/scm/lin... (diff)
downloadlinux-0495cb75ed301bbe6b01346cbf8bc5244a2948b2.tar.xz
linux-0495cb75ed301bbe6b01346cbf8bc5244a2948b2.zip
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.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;