Skip to contentSkip to conversation

iommu/mediatek: Fix driver name

PATCH Applied Matthias Brugger 2 participants 2 messages Oct 30, 2017 – Nov 6, 2017

Subsystems (3)
lore
Share & tools
lore

Matthias Brugger

author maintainer
#0 lore raw

PATCH 1/1 iommu/mediatek: Fix driver name

There exist two Mediatek iommu drivers for the two different generations of the device. But both drivers have the same name "mtk-iommu". This breaks the registration of the second driver:

Error: Driver 'mtk-iommu' is already registered, aborting...

Fix this by changing the name for first generation to "mtk-iommu-v1".

Fixes b17336c55d89 ("iommu/mediatek: add support for mtk iommu generation one HW")
---
 drivers/iommu/mtk_iommu_v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/mtk_iommu_v1.c +1 -1
index bc1efbfb9ddf..542930cd183d 100644
@@ -708,7 +708,7 @@ static struct platform_driver mtk_iommu_driver = {
 	.probe	= mtk_iommu_probe,
 	.remove	= mtk_iommu_remove,
 	.driver	= {
-		.name = "mtk-iommu",
+		.name = "mtk-iommu-v1",
 		.of_match_table = mtk_iommu_of_ids,
 		.pm = &mtk_iommu_pm_ops,
 	}
Signature · 1 line
2.14.2
#1 lore raw
Quoted 20 lines · On Mon, 30 Oct 2017 12:37:55 +0100 Matthias Brugger <[email protected]>…

There exist two Mediatek iommu drivers for the two different generations of the device. But both drivers have the same name "mtk-iommu". This breaks the registration of the second driver:

Error: Driver 'mtk-iommu' is already registered, aborting...

Fix this by changing the name for first generation to "mtk-iommu-v1".

Fixes b17336c55d89 ("iommu/mediatek: add support for mtk iommu generation one HW")
---
 drivers/iommu/mtk_iommu_v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/mtk_iommu_v1.c +0 -0
index bc1efbfb9ddf..542930cd183d 100644

drivers/iommu/mtk_iommu_v1.c static struct platform_driver mtk_iommu_driver = { · line 714

Quoted 8 lines
drivers/iommu/mtk_iommu_v1.c +1 -1
@@ -708,7 +708,7 @@ static struct platform_driver mtk_iommu_driver = {
 	.probe	= mtk_iommu_probe,
 	.remove	= mtk_iommu_remove,
 	.driver	= {
-		.name = "mtk-iommu",
+		.name = "mtk-iommu-v1",
 		.of_match_table = mtk_iommu_of_ids,
 		.pm = &mtk_iommu_pm_ops,
 	}

Applied to iommu/updates for v4.15. Thanks,

Alex