diff options
author | Thierry Reding <treding@nvidia.com> | 2018-07-10 12:51:38 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2018-07-10 17:59:05 +0200 |
commit | b6d83fccd877221416658fbdb59ba4d1628ba800 (patch) | |
tree | 6067729a0c5694d10b6a144d0dc9a6abade684e3 /drivers/gpu/drm/panel | |
parent | cd0e0ca69109d025b1a1b6609f70682db62138b0 (diff) |
drm/panel: p079zca: Use of_device_get_match_data()
Use this helper to get rid of some extra boilerplate code.
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710110127.12315-1-thierry.reding@gmail.com
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r-- | drivers/gpu/drm/panel/panel-innolux-p079zca.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c index 424d0bf3c595..72edb334d997 100644 --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c @@ -11,6 +11,7 @@ #include <linux/gpio/consumer.h> #include <linux/module.h> #include <linux/of.h> +#include <linux/of_device.h> #include <linux/regulator/consumer.h> #include <drm/drmP.h> @@ -512,14 +513,9 @@ static void innolux_panel_del(struct innolux_panel *innolux) static int innolux_panel_probe(struct mipi_dsi_device *dsi) { const struct panel_desc *desc; - const struct of_device_id *id; int err; - id = of_match_node(innolux_of_match, dsi->dev.of_node); - if (!id) - return -ENODEV; - - desc = id->data; + desc = of_device_get_match_data(&dsi->dev); dsi->mode_flags = desc->flags; dsi->format = desc->format; dsi->lanes = desc->lanes; |