[PATCH 1/5] drivers: video: mxsfb: Use kconfig VIDEO_REMOVE to remove video

Thomas Bonnefille thomas.bonnefille at bootlin.com
Wed Nov 26 00:41:53 CET 2025


This commit condition the removal of the video driver to the existence
of the VIDEO_REMOVE kconfig parameter on the model of what has been done
on commit b8d3a6c7d12f ("drivers: video: tidss: tidss_drv: Use kconfig
VIDEO_REMOVE to remove video") for TI DSS driver.

Signed-off-by: Thomas Bonnefille <thomas.bonnefille at bootlin.com>
---
 drivers/video/mxsfb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index e72839cead4..f30818d90c7 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -375,9 +375,11 @@ static int mxs_video_bind(struct udevice *dev)
 
 static int mxs_video_remove(struct udevice *dev)
 {
-	struct video_uc_plat *plat = dev_get_uclass_plat(dev);
+	if (CONFIG_IS_ENABLED(VIDEO_REMOVE)) {
+		struct video_uc_plat *plat = dev_get_uclass_plat(dev);
 
-	mxs_remove_common(plat->base);
+		mxs_remove_common(plat->base);
+	}
 
 	return 0;
 }

-- 
2.52.0



More information about the U-Boot mailing list