]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: ipuv3: fix building with disabled panel driver
authorAnatolij Gustschin <agust@denx.de>
Mon, 25 May 2020 22:09:22 +0000 (00:09 +0200)
committerAnatolij Gustschin <agust@denx.de>
Thu, 18 Jun 2020 17:27:49 +0000 (19:27 +0200)
Panel code might be disabled for some boards, make this
driver code optional.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
drivers/video/imx/mxc_ipuv3_fb.c

index 4044473f99841b4c9309ec93b4ed2ed2814b16e3..cdef84af0e3e5288f4132774c2c21aecdfcdf2dd 100644 (file)
@@ -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;