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 <agust@denx.de>
This commit is contained in:
		
							parent
							
								
									39b95556f9
								
							
						
					
					
						commit
						0b12f76f72
					
				| 
						 | 
					@ -645,7 +645,6 @@ static int ipuv3_video_probe(struct udevice *dev)
 | 
				
			||||||
#if defined(CONFIG_DISPLAY)
 | 
					#if defined(CONFIG_DISPLAY)
 | 
				
			||||||
	struct udevice *disp_dev;
 | 
						struct udevice *disp_dev;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	struct udevice *panel_dev;
 | 
					 | 
				
			||||||
	u32 fb_start, fb_end;
 | 
						u32 fb_start, fb_end;
 | 
				
			||||||
	int ret;
 | 
						int ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -672,9 +671,13 @@ static int ipuv3_video_probe(struct udevice *dev)
 | 
				
			||||||
			return ret;
 | 
								return ret;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	ret = uclass_get_device(UCLASS_PANEL, 0, &panel_dev);
 | 
						if (CONFIG_IS_ENABLED(PANEL)) {
 | 
				
			||||||
	if (panel_dev)
 | 
							struct udevice *panel_dev;
 | 
				
			||||||
		panel_enable_backlight(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->xsize = gmode->xres;
 | 
				
			||||||
	uc_priv->ysize = gmode->yres;
 | 
						uc_priv->ysize = gmode->yres;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue