summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/dc.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-08-21 16:35:17 +0200
committerThierry Reding <treding@nvidia.com>2017-10-20 14:19:53 +0200
commitb9ff7aeaefbb39d9882547fa4b02e6e34a7b9463 (patch)
treecef2cb2859ef23145241ae692bfbac886f2bfd98 /drivers/gpu/drm/tegra/dc.c
parentdrm/tegra: Use u64_to_user_ptr helper (diff)
downloadlinux-b9ff7aeaefbb39d9882547fa4b02e6e34a7b9463.tar.xz
linux-b9ff7aeaefbb39d9882547fa4b02e6e34a7b9463.zip
drm/tegra: dc: Use of_device_get_match_data()
Avoid some boilerplate by calling of_device_get_match_data() instead of open-coding the equivalent in the driver. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/dc.c')
-rw-r--r--drivers/gpu/drm/tegra/dc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index bc51eb855bf1..2b5e052fb8d3 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -10,6 +10,7 @@
#include <linux/clk.h>
#include <linux/debugfs.h>
#include <linux/iommu.h>
+#include <linux/of_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
@@ -1985,7 +1986,6 @@ static int tegra_dc_parse_dt(struct tegra_dc *dc)
static int tegra_dc_probe(struct platform_device *pdev)
{
- const struct of_device_id *id;
struct resource *regs;
struct tegra_dc *dc;
int err;
@@ -1994,14 +1994,11 @@ static int tegra_dc_probe(struct platform_device *pdev)
if (!dc)
return -ENOMEM;
- id = of_match_node(tegra_dc_of_match, pdev->dev.of_node);
- if (!id)
- return -ENODEV;
+ dc->soc = of_device_get_match_data(&pdev->dev);
spin_lock_init(&dc->lock);
INIT_LIST_HEAD(&dc->list);
dc->dev = &pdev->dev;
- dc->soc = id->data;
err = tegra_dc_parse_dt(dc);
if (err < 0)