* [PATCH] iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()
@ 2017-08-21 5:53 Magnus Damm
2017-08-22 14:19 ` Joerg Roedel
0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2017-08-21 5:53 UTC (permalink / raw)
To: joro
Cc: laurent.pinchart+renesas, geert+renesas, sricharan, will.deacon,
linux-kernel, linux-renesas-soc, iommu, horms+renesas,
Magnus Damm, robin.murphy, m.szyprowski
From: Magnus Damm <damm+renesas@opensource.se>
Extend the driver to make use of iommu_device_sysfs_add()/remove()
functions to hook up initial sysfs support.
Suggested-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
Applies on top of next-20170817
drivers/iommu/ipmmu-vmsa.c | 6 ++++++
1 file changed, 6 insertions(+)
--- 0001/drivers/iommu/ipmmu-vmsa.c
+++ work/drivers/iommu/ipmmu-vmsa.c 2017-08-21 14:40:13.940607110 +0900
@@ -953,6 +953,11 @@ static int ipmmu_probe(struct platform_d
ipmmu_device_reset(mmu);
+ ret = iommu_device_sysfs_add(&mmu->iommu, &pdev->dev, NULL,
+ dev_name(&pdev->dev));
+ if (ret)
+ return ret;
+
iommu_device_set_ops(&mmu->iommu, &ipmmu_ops);
iommu_device_set_fwnode(&mmu->iommu, &pdev->dev.of_node->fwnode);
@@ -975,6 +980,7 @@ static int ipmmu_remove(struct platform_
{
struct ipmmu_vmsa_device *mmu = platform_get_drvdata(pdev);
+ iommu_device_sysfs_remove(&mmu->iommu);
iommu_device_unregister(&mmu->iommu);
#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()
2017-08-21 5:53 [PATCH] iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove() Magnus Damm
@ 2017-08-22 14:19 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2017-08-22 14:19 UTC (permalink / raw)
To: Magnus Damm
Cc: laurent.pinchart+renesas, geert+renesas, sricharan, will.deacon,
linux-kernel, linux-renesas-soc, iommu, horms+renesas,
robin.murphy, m.szyprowski
On Mon, Aug 21, 2017 at 02:53:35PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
>
> Extend the driver to make use of iommu_device_sysfs_add()/remove()
> functions to hook up initial sysfs support.
>
> Suggested-by: Joerg Roedel <jroedel@suse.de>
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-22 14:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-21 5:53 [PATCH] iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove() Magnus Damm
2017-08-22 14:19 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).