dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/panel: innolux-p079zca: Use of_device_get_match_data()
@ 2018-07-10 11:01 Thierry Reding
  2018-07-10 12:41 ` Heiko Stuebner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thierry Reding @ 2018-07-10 11:01 UTC (permalink / raw)
  To: Thierry Reding; +Cc: dri-devel, Lin Huang

From: Thierry Reding <treding@nvidia.com>

Use this helper to get rid of some extra boilerplate code.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/panel/panel-innolux-p079zca.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
index 185a55060195..62fbaac96823 100644
--- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
+++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
@@ -314,14 +314,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;
-- 
2.17.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-10 14:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-10 11:01 [PATCH] drm/panel: innolux-p079zca: Use of_device_get_match_data() Thierry Reding
2018-07-10 12:41 ` Heiko Stuebner
2018-07-10 14:21 ` Thierry Reding
2018-07-10 14:24 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).