提交 7af9a5fd 编写于 作者: M Magnus Damm 提交者: Joerg Roedel

iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()

Extend the driver to make use of iommu_device_sysfs_add()/remove()
functions to hook up initial sysfs support.
Suggested-by: NJoerg Roedel <jroedel@suse.de>
Signed-off-by: NMagnus Damm <damm+renesas@opensource.se>
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 02dd44ca
...@@ -953,6 +953,11 @@ static int ipmmu_probe(struct platform_device *pdev) ...@@ -953,6 +953,11 @@ static int ipmmu_probe(struct platform_device *pdev)
ipmmu_device_reset(mmu); 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_ops(&mmu->iommu, &ipmmu_ops);
iommu_device_set_fwnode(&mmu->iommu, &pdev->dev.of_node->fwnode); iommu_device_set_fwnode(&mmu->iommu, &pdev->dev.of_node->fwnode);
...@@ -975,6 +980,7 @@ static int ipmmu_remove(struct platform_device *pdev) ...@@ -975,6 +980,7 @@ static int ipmmu_remove(struct platform_device *pdev)
{ {
struct ipmmu_vmsa_device *mmu = platform_get_drvdata(pdev); struct ipmmu_vmsa_device *mmu = platform_get_drvdata(pdev);
iommu_device_sysfs_remove(&mmu->iommu);
iommu_device_unregister(&mmu->iommu); iommu_device_unregister(&mmu->iommu);
#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA) #if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册