Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0495cb75 authored by Will Deacon's avatar Will Deacon Committed by Olof Johansson
Browse files

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: default avatarRob Herring <robh@kernel.org>
Reported-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent 4d4ac7aa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;