Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716100 > unrolled thread

[PATCH] iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()

Started byMagnus Damm <magnus.damm@gmail.com>
First post2017-08-21 08:00 +0200
Last post2017-08-22 16:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove() Magnus Damm <magnus.damm@gmail.com> - 2017-08-21 08:00 +0200
    Re: [PATCH] iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove() Joerg Roedel <joro@8bytes.org> - 2017-08-22 16:20 +0200

#1716100 — [PATCH] iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()

FromMagnus Damm <magnus.damm@gmail.com>
Date2017-08-21 08:00 +0200
Subject[PATCH] iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()
Message-ID<ugNUK-hY-17@gated-at.bofh.it>
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)

[toc] | [next] | [standalone]


#1717453

FromJoerg Roedel <joro@8bytes.org>
Date2017-08-22 16:20 +0200
Message-ID<uhica-3vV-17@gated-at.bofh.it>
In reply to#1716100
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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web