Commit b6d83fcc authored by Thierry Reding's avatar Thierry Reding

drm/panel: p079zca: Use of_device_get_match_data()

Use this helper to get rid of some extra boilerplate code.
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710110127.12315-1-thierry.reding@gmail.com
parent cd0e0ca6
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_device.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <drm/drmP.h> #include <drm/drmP.h>
...@@ -512,14 +513,9 @@ static void innolux_panel_del(struct innolux_panel *innolux) ...@@ -512,14 +513,9 @@ static void innolux_panel_del(struct innolux_panel *innolux)
static int innolux_panel_probe(struct mipi_dsi_device *dsi) static int innolux_panel_probe(struct mipi_dsi_device *dsi)
{ {
const struct panel_desc *desc; const struct panel_desc *desc;
const struct of_device_id *id;
int err; int err;
id = of_match_node(innolux_of_match, dsi->dev.of_node); desc = of_device_get_match_data(&dsi->dev);
if (!id)
return -ENODEV;
desc = id->data;
dsi->mode_flags = desc->flags; dsi->mode_flags = desc->flags;
dsi->format = desc->format; dsi->format = desc->format;
dsi->lanes = desc->lanes; dsi->lanes = desc->lanes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment