From: Anatolij Gustschin Date: Mon, 25 May 2020 22:09:22 +0000 (+0200) Subject: video: ipuv3: fix building with disabled panel driver X-Git-Tag: v2025.01-rc5-pxa1908~2332^2~11^2~13 X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/%7B%7B%20%24style.Permalink%20%7D%7D?a=commitdiff_plain;h=0b12f76f7241cb22d4a41ab048b64c8c3a88199d;p=u-boot.git video: ipuv3: fix building with disabled panel driver Panel code might be disabled for some boards, make this driver code optional. Signed-off-by: Anatolij Gustschin --- diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c index 4044473f99..cdef84af0e 100644 --- a/drivers/video/imx/mxc_ipuv3_fb.c +++ b/drivers/video/imx/mxc_ipuv3_fb.c @@ -645,7 +645,6 @@ static int ipuv3_video_probe(struct udevice *dev) #if defined(CONFIG_DISPLAY) struct udevice *disp_dev; #endif - struct udevice *panel_dev; u32 fb_start, fb_end; int ret; @@ -672,9 +671,13 @@ static int ipuv3_video_probe(struct udevice *dev) return ret; } #endif - ret = uclass_get_device(UCLASS_PANEL, 0, &panel_dev); - if (panel_dev) - panel_enable_backlight(panel_dev); + if (CONFIG_IS_ENABLED(PANEL)) { + struct udevice *panel_dev; + + ret = uclass_get_device(UCLASS_PANEL, 0, &panel_dev); + if (panel_dev) + panel_enable_backlight(panel_dev); + } uc_priv->xsize = gmode->xres; uc_priv->ysize = gmode->yres;