diff options
author | Thierry Reding <treding@nvidia.com> | 2017-08-21 18:05:10 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2017-10-20 14:19:53 +0200 |
commit | 5e4acd30f308be9ec6eba0b9b296210bbcf0ed3d (patch) | |
tree | a5cd404c3d3b537ff8a7b45d147731f02e442bd2 /drivers/gpu | |
parent | drm/tegra: dc: Use of_device_get_match_data() (diff) | |
download | linux-5e4acd30f308be9ec6eba0b9b296210bbcf0ed3d.tar.xz linux-5e4acd30f308be9ec6eba0b9b296210bbcf0ed3d.zip |
drm/tegra: hdmi: 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')
-rw-r--r-- | drivers/gpu/drm/tegra/hdmi.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 5b9d83b71943..a4e9c769fc7a 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -11,6 +11,7 @@ #include <linux/debugfs.h> #include <linux/gpio.h> #include <linux/hdmi.h> +#include <linux/of_device.h> #include <linux/pm_runtime.h> #include <linux/regulator/consumer.h> #include <linux/reset.h> @@ -1663,20 +1664,15 @@ static irqreturn_t tegra_hdmi_irq(int irq, void *data) static int tegra_hdmi_probe(struct platform_device *pdev) { - const struct of_device_id *match; struct tegra_hdmi *hdmi; struct resource *regs; int err; - match = of_match_node(tegra_hdmi_of_match, pdev->dev.of_node); - if (!match) - return -ENODEV; - hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL); if (!hdmi) return -ENOMEM; - hdmi->config = match->data; + hdmi->config = of_device_get_match_data(&pdev->dev); hdmi->dev = &pdev->dev; hdmi->audio_source = AUTO; |