Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video/cmdline: Hide __video_get_options() behind CONFIG_FB_CORE

The function __video_get_options() only exists for compatibility
with old fbdev drivers that cannot be refactored easily. Hide it
behind CONFIG_FB_CORE.

v2:
* support CONFIG_FB_CORE=m via IS_ENABLED() (kernel test robot)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20240118090721.7995-3-tzimmermann@suse.de

+5
+2
drivers/video/cmdline.c
··· 80 80 } 81 81 EXPORT_SYMBOL(video_get_options); 82 82 83 + #if IS_ENABLED(CONFIG_FB_CORE) 83 84 bool __video_get_options(const char *name, const char **options, bool is_of) 84 85 { 85 86 bool enabled = true; ··· 97 96 return enabled; 98 97 } 99 98 EXPORT_SYMBOL(__video_get_options); 99 + #endif 100 100 101 101 /* 102 102 * Process command line options for video adapters. This function is
+3
include/video/cmdline.h
··· 3 3 #ifndef VIDEO_CMDLINE_H 4 4 #define VIDEO_CMDLINE_H 5 5 6 + #include <linux/kconfig.h> 6 7 #include <linux/types.h> 7 8 8 9 const char *video_get_options(const char *name); 9 10 11 + #if IS_ENABLED(CONFIG_FB_CORE) 10 12 /* exported for compatibility with fbdev; don't use in new code */ 11 13 bool __video_get_options(const char *name, const char **option, bool is_of); 14 + #endif 12 15 13 16 #endif