Skip to content

Commit

Permalink
of/platform: teardown DMA mappings on device destruction
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Will Deacon authored and Olof Johansson committed Jan 21, 2015
1 parent 4d4ac7a commit 0495cb7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/of/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0495cb7

Please sign in to comment.