From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] of/platform: teardown DMA mappings on device destruction
Date: Mon, 12 Jan 2015 17:23:32 +0000 [thread overview]
Message-ID: <1421083413-24798-2-git-send-email-will.deacon@arm.com> (raw)
In-Reply-To: <1421083413-24798-1-git-send-email-will.deacon@arm.com>
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@ideasonboard.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
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
next prev parent reply other threads:[~2015-01-12 17:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-12 17:23 [PATCH 0/2] A couple of DMA teardown fixes for 3.19 Will Deacon
2015-01-12 17:23 ` Will Deacon [this message]
2015-01-12 17:23 ` [PATCH 2/2] ARM: dma-mapping: don't detach devices without an IOMMU during teardown Will Deacon
2015-01-13 14:53 ` Laurent Pinchart
2015-01-13 15:24 ` Will Deacon
2015-01-13 15:42 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421083413-24798-2-git-send-email-will.deacon@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.