[PATCH v2 1/3] of/platform: teardown DMA mappings on device destruction

Rob Herring robherring2 at gmail.com
Wed Jan 14 11:53:48 PST 2015


On Wed, Jan 14, 2015 at 1:13 PM, Will Deacon <will.deacon at arm.com> wrote:
> 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.
>
> Reported-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Will Deacon <will.deacon at arm.com>

Acked-by: Rob Herring <robh at kernel.org>

> ---
>  drivers/of/platform.c | 1 +
>  1 file changed, 1 insertion(+)
>
> 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;
> --
> 2.1.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



More information about the linux-arm-kernel mailing list