summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/amba-clcd.c
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2017-01-30 17:39:48 +0100
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2017-01-30 17:39:48 +0100
commitbe7367968f54b452ee221ba03458593499e040cc (patch)
tree76f83916701aa7263082dabb4685e9fa9dbaf0cd /drivers/video/fbdev/amba-clcd.c
parentvideo: ARM CLCD: sort included headers out alphabetically (diff)
downloadlinux-be7367968f54b452ee221ba03458593499e040cc.tar.xz
linux-be7367968f54b452ee221ba03458593499e040cc.zip
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 <tomi.valkeinen@ti.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/amba-clcd.c')
-rw-r--r--drivers/video/fbdev/amba-clcd.c8
1 files changed, 6 insertions, 2 deletions
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;
}