summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-09-07 10:52:05 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2023-09-11 15:12:37 +0200
commit9ab7dc25ab65db5f8d45bc6ee0431f9ae387b642 (patch)
tree5177049cad83bc59a7ddddf28ffeda5b45361a83 /drivers/video
parent8887086ef2e0047ec321103a15e7d766be3a3874 (diff)
downloadlwn-9ab7dc25ab65db5f8d45bc6ee0431f9ae387b642.tar.gz
lwn-9ab7dc25ab65db5f8d45bc6ee0431f9ae387b642.zip
fbdev/core: Remove empty internal helpers from fb_logo.c
Remove the two empty helpers for the case the CONFIG_FB_LOGO_EXTRA has not been set. They are internal functions and only called once. Providing empty replacements seems like overkill. Instead protect the call sites with a test for CONFIG_FB_LOGO_EXTRA. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230907085408.9354-7-tzimmermann@suse.de
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/core/fb_logo.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/video/fbdev/core/fb_logo.c b/drivers/video/fbdev/core/fb_logo.c
index 6897f7a898fc..0bab8352b684 100644
--- a/drivers/video/fbdev/core/fb_logo.c
+++ b/drivers/video/fbdev/core/fb_logo.c
@@ -413,21 +413,6 @@ static int fb_show_extra_logos(struct fb_info *info, int y, int rotate)
return y;
}
-
-#else /* !CONFIG_FB_LOGO_EXTRA */
-
-static inline int fb_prepare_extra_logos(struct fb_info *info,
- unsigned int height,
- unsigned int yres)
-{
- return height;
-}
-
-static inline int fb_show_extra_logos(struct fb_info *info, int y, int rotate)
-{
- return y;
-}
-
#endif /* CONFIG_FB_LOGO_EXTRA */
int fb_prepare_logo(struct fb_info *info, int rotate)
@@ -498,8 +483,11 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
height = fb_logo.logo->height;
if (fb_center_logo)
height += (yres - fb_logo.logo->height) / 2;
+#ifdef CONFIG_FB_LOGO_EXTRA
+ height = fb_prepare_extra_logos(info, height, yres);
+#endif
- return fb_prepare_extra_logos(info, height, yres);
+ return height;
}
int fb_show_logo(struct fb_info *info, int rotate)
@@ -512,7 +500,9 @@ int fb_show_logo(struct fb_info *info, int rotate)
count = fb_logo_count < 0 ? num_online_cpus() : fb_logo_count;
y = fb_show_logo_line(info, rotate, fb_logo.logo, 0, count);
+#ifdef CONFIG_FB_LOGO_EXTRA
y = fb_show_extra_logos(info, y, rotate);
+#endif
return y;
}