Thread (25 messages) flat view 25 messages, 2 authors, 2016-06-06
STALE3751d

[PATCH 22/22] iommu/mediatek: Use of_device_match()

From: Thierry Reding <hidden>
Date: 2016-06-06 08:33:32
Also in: lkml
Subsystem: iommu subsystem, mediatek iommu driver, the rest · Maintainers: Joerg Roedel, Will Deacon, Yong Wu, Linus Torvalds

From: Thierry Reding <redacted>

Use the common implementation instead of the driver-private variant.

Signed-off-by: Thierry Reding <redacted>
---
 drivers/iommu/mtk_iommu.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index c036df1c49ca..80e7b7a79343 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -24,6 +24,7 @@
 #include <linux/iopoll.h>
 #include <linux/list.h>
 #include <linux/of_address.h>
+#include <linux/of_device.h>
 #include <linux/of_iommu.h>
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
@@ -552,11 +553,6 @@ static int mtk_iommu_hw_init(const struct mtk_iommu_data *data)
 	return 0;
 }
 
-static int compare_of(struct device *dev, void *data)
-{
-	return dev->of_node == data;
-}
-
 static void release_of(struct device *dev, void *data)
 {
 	of_node_put(data);
@@ -647,7 +643,7 @@ static int mtk_iommu_probe(struct platform_device *pdev)
 		data->smi_imu.larb_imu[i].dev = &plarbdev->dev;
 
 		component_match_add_release(dev, &match, release_of,
-					    compare_of, larbnode);
+					    of_device_match, larbnode);
 	}
 
 	platform_set_drvdata(pdev, data);
-- 
2.8.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help