fbdev: Make registered_fb[] private to fbmem.c
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 25 Jul 2022 07:54:00 +0000 (09:54 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 27 Jul 2022 07:40:18 +0000 (09:40 +0200)
No driver access this anymore, except for the olpc dcon fbdev driver but
that has been marked as broken anyways by commit de0952f267ff ("staging:
olpc_dcon: mark driver as broken").

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220725075400.68478-1-javierm@redhat.com
drivers/video/fbdev/core/fbmem.c
include/linux/fb.h

index 6ae1c5fa19f9e482bf88c6459b2d9307c89d102a..1e70d8c6765337b9b8ad99676fc61d9edc180cc8 100644 (file)
 static DEFINE_MUTEX(registration_lock);
 
 struct fb_info *registered_fb[FB_MAX] __read_mostly;
-EXPORT_SYMBOL(registered_fb);
-
 int num_registered_fb __read_mostly;
-EXPORT_SYMBOL(num_registered_fb);
+#define for_each_registered_fb(i)              \
+       for (i = 0; i < FB_MAX; i++)            \
+               if (!registered_fb[i]) {} else
 
 bool fb_center_logo __read_mostly;
 
index 453c3b2b6b8e261b4ff31e728be20632a934338b..0aff76bcbb00cff75d868e771e28204b29c5c17b 100644 (file)
@@ -627,16 +627,10 @@ 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 struct fb_info *registered_fb[FB_MAX];
-extern int num_registered_fb;
 extern bool fb_center_logo;
 extern int fb_logo_count;
 extern struct class *fb_class;
 
-#define for_each_registered_fb(i)              \
-       for (i = 0; i < FB_MAX; i++)            \
-               if (!registered_fb[i]) {} else
-
 static inline void lock_fb_info(struct fb_info *info)
 {
        mutex_lock(&info->lock);