fbdev/core: Unexport logo helpers
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 7 Sep 2023 08:52:03 +0000 (10:52 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 11 Sep 2023 13:12:33 +0000 (15:12 +0200)
The interfaces for the fbdev logo are not used outside of the fbdev
module. Hence declare the fbdev logo functions in the internal header
file and remove their symbol exports. Only build the functions if
CONFIG_LOGO has been selected.

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-5-tzimmermann@suse.de
drivers/video/fbdev/core/fb_internal.h
drivers/video/fbdev/core/fbmem.c
include/linux/fb.h

index 4c8d509a002652f45d13ef8e52fdb4df5519d36f..1116faefa03470dbdfb73f9408c06731e5d6288b 100644 (file)
@@ -21,6 +21,22 @@ static inline void fb_unregister_chrdev(void)
 #endif
 
 /* fbmem.c */
+#if defined(CONFIG_LOGO)
+extern bool fb_center_logo;
+extern int fb_logo_count;
+int fb_prepare_logo(struct fb_info *fb_info, int rotate);
+int fb_show_logo(struct fb_info *fb_info, int rotate);
+#else
+static inline int fb_prepare_logo(struct fb_info *info, int rotate)
+{
+       return 0;
+}
+static inline int fb_show_logo(struct fb_info *info, int rotate)
+{
+       return 0;
+}
+#endif /* CONFIG_LOGO */
+
 extern struct class *fb_class;
 extern struct mutex registration_lock;
 extern struct fb_info *registered_fb[FB_MAX];
index 98e1847e42871f01ea40c3f2dc9819f57b2bcd1b..ee25ac38737d6d2c7f899efccd3426a78db2019f 100644 (file)
@@ -696,12 +696,7 @@ int fb_show_logo(struct fb_info *info, int rotate)
 
        return y;
 }
-#else
-int fb_prepare_logo(struct fb_info *info, int rotate) { return 0; }
-int fb_show_logo(struct fb_info *info, int rotate) { return 0; }
 #endif /* CONFIG_LOGO */
-EXPORT_SYMBOL(fb_prepare_logo);
-EXPORT_SYMBOL(fb_show_logo);
 
 int
 fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var)
index 16c3e6d6c55d34c7d263d5c807e50eecc577072d..d110676c9c836e6795ebe42c8e8431ef01e220d6 100644 (file)
@@ -591,8 +591,6 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf,
 /* drivers/video/fbmem.c */
 extern int register_framebuffer(struct fb_info *fb_info);
 extern void unregister_framebuffer(struct fb_info *fb_info);
-extern int fb_prepare_logo(struct fb_info *fb_info, int rotate);
-extern int fb_show_logo(struct fb_info *fb_info, int rotate);
 extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size);
 extern void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 idx,
                                u32 height, u32 shift_high, u32 shift_low, u32 mod);
@@ -603,9 +601,6 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var,
 extern int fb_get_options(const char *name, char **option);
 extern int fb_new_modelist(struct fb_info *info);
 
-extern bool fb_center_logo;
-extern int fb_logo_count;
-
 static inline void lock_fb_info(struct fb_info *info)
 {
        mutex_lock(&info->lock);