From be7367968f54b452ee221ba03458593499e040cc Mon Sep 17 00:00:00 2001 From: Vladimir Zapolskiy Date: Mon, 30 Jan 2017 17:39:48 +0100 Subject: video: ARM CLCD: use panel device node for panel initialization There is no necessity to pass an endpoint device node to custom panel initialization functions, because a child panel device node should be sufficient, note that the existing init_panel() callback declaration from linux/amba/clcd.h already prompts to use the panel device node here. Cc: Tomi Valkeinen Cc: Russell King Cc: Linus Walleij Cc: Arnd Bergmann Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/amba-clcd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/video/fbdev/amba-clcd.c') diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index a806fb803ab9..f25b5fce9991 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -764,7 +764,7 @@ static int clcdfb_of_init_tft_panel(struct clcd_fb *fb, u32 r0, u32 g0, u32 b0) static int clcdfb_of_init_display(struct clcd_fb *fb) { - struct device_node *endpoint; + struct device_node *endpoint, *panel; int err; unsigned int bpp; u32 max_bandwidth; @@ -781,8 +781,12 @@ static int clcdfb_of_init_display(struct clcd_fb *fb) if (!endpoint) return -ENODEV; + panel = of_graph_get_remote_port_parent(endpoint); + if (!panel) + return -ENODEV; + if (fb->vendor->init_panel) { - err = fb->vendor->init_panel(fb, endpoint); + err = fb->vendor->init_panel(fb, panel); if (err) return err; } -- cgit v1.2.3