diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2018-12-12 23:38:54 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2019-01-16 15:54:12 +0300 |
commit | 59cd046f7f94543540d82216dbbfd8146db43b70 (patch) | |
tree | 178555c4b819efe46fd1e6d1539d31826a5d0d81 /drivers/memory | |
parent | b3bb6b858f2a60fe3ac0c3833084386f7dd420e4 (diff) | |
download | linux-59cd046f7f94543540d82216dbbfd8146db43b70.tar.xz |
memory: tegra: Use of_device_get_match_data()
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 <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/tegra/mc.c | 8 |
1 files 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 <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> +#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/sort.h> @@ -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 */ |