Re: [PATCH v6 11/21] memory: tegra: Use of_device_get_match_data()

2018-12-12 Thread Thierry Reding
On Sun, Dec 09, 2018 at 11:29:40PM +0300, Dmitry Osipenko wrote:
> There is no need to match device with the DT node since it was already
> matched, use of_device_get_match_data() helper to get the match-data.
> 
> Signed-off-by: Dmitry Osipenko 
> ---
>  drivers/memory/tegra/mc.c | 8 ++--
>  1 file changed, 2 insertions(+), 6 deletions(-)

Acked-by: Thierry Reding 


signature.asc
Description: PGP signature
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH v6 11/21] memory: tegra: Use of_device_get_match_data()

2018-12-09 Thread Dmitry Osipenko
There is no need to match device with the DT node since it was already
matched, use of_device_get_match_data() helper to get the match-data.

Signed-off-by: Dmitry Osipenko 
---
 drivers/memory/tegra/mc.c | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index ce8cf81b55d7..55ecfb2d8cfd 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -619,23 +620,18 @@ static __maybe_unused irqreturn_t tegra20_mc_irq(int irq, 
void *data)
 
 static int tegra_mc_probe(struct platform_device *pdev)
 {
-   const struct of_device_id *match;
struct resource *res;
struct tegra_mc *mc;
void *isr;
int err;
 
-   match = of_match_node(tegra_mc_of_match, pdev->dev.of_node);
-   if (!match)
-   return -ENODEV;
-
mc = devm_kzalloc(&pdev->dev, sizeof(*mc), GFP_KERNEL);
if (!mc)
return -ENOMEM;
 
platform_set_drvdata(pdev, mc);
spin_lock_init(&mc->lock);
-   mc->soc = match->data;
+   mc->soc = of_device_get_match_data(&pdev->dev);
mc->dev = &pdev->dev;
 
/* length of MC tick in nanoseconds */
-- 
2.19.1

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu