[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2016 10:32:04 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Russell King <linux@...linux.org.uk>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 22/22] iommu/mediatek: Use of_device_match()
From: Thierry Reding <treding@...dia.com>
Use the common implementation instead of the driver-private variant.
Signed-off-by: Thierry Reding <treding@...dia.com>
---
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
Powered by blists - more mailing lists