debug("Failed to stash bootstage: err=%d\n", ret);
#endif
-#if defined(CONFIG_SPL_VIDEO)
- struct udevice *dev;
- int rc;
-
- rc = uclass_find_device(UCLASS_VIDEO, 0, &dev);
- if (!rc && dev) {
- rc = device_remove(dev, DM_REMOVE_NORMAL);
- if (rc)
- printf("Cannot remove video device '%s' (err=%d)\n",
- dev->name, rc);
+ if (IS_ENABLED(CONFIG_SPL_VIDEO_REMOVE)) {
+ struct udevice *dev;
+ int rc;
+
+ rc = uclass_find_device(UCLASS_VIDEO, 0, &dev);
+ if (!rc && dev) {
+ rc = device_remove(dev, DM_REMOVE_NORMAL);
+ if (rc)
+ printf("Cannot remove video device '%s' (err=%d)\n",
+ dev->name, rc);
+ }
}
-#endif
spl_board_prepare_for_boot();
jump_to_image_no_args(&spl_image);