From 42b18494bdaf677c4726ef47a839b16a1a3daba2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Jun 2023 10:22:34 -0600 Subject: expo: Store the console in the expo Rather than finding this each time, keep a pointer to it. This simplifies the code a little. Signed-off-by: Simon Glass --- boot/scene.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'boot/scene.c') diff --git a/boot/scene.c b/boot/scene.c index d2f77c008c..7e9ba047f2 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -278,16 +278,10 @@ static int scene_obj_render(struct scene_obj *obj, bool text_mode) { struct scene *scn = obj->scene; struct expo *exp = scn->expo; - struct udevice *cons, *dev = exp->display; + struct udevice *dev = exp->display; + struct udevice *cons = text_mode ? NULL : exp->cons; int x, y, ret; - cons = NULL; - if (!text_mode) { - ret = device_find_first_child_by_uclass(dev, - UCLASS_VIDEO_CONSOLE, - &cons); - } - x = obj->x; y = obj->y; -- cgit v1.2.3