]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
video/cmdline: Hide __video_get_options() behind CONFIG_FB_CORE
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 18 Jan 2024 09:05:27 +0000 (10:05 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 23 Jan 2024 09:11:34 +0000 (10:11 +0100)
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
drivers/video/cmdline.c
include/video/cmdline.h

index d3d257489c3d51f2bf638ce8979be2a4e7c8fc82..49ee3fb4951a55b3cbe11c387191a70cc0c162c8 100644 (file)
@@ -80,6 +80,7 @@ const char *video_get_options(const char *name)
 }
 EXPORT_SYMBOL(video_get_options);
 
+#if IS_ENABLED(CONFIG_FB_CORE)
 bool __video_get_options(const char *name, const char **options, bool is_of)
 {
        bool enabled = true;
@@ -96,6 +97,7 @@ bool __video_get_options(const char *name, const char **options, bool is_of)
        return enabled;
 }
 EXPORT_SYMBOL(__video_get_options);
+#endif
 
 /*
  * Process command line options for video adapters. This function is
index 77292d1d6173b29e46714fed38fc9b39186afc46..76649465bb084fa15ecde4e3ab918c9a9ca347f0 100644 (file)
@@ -3,11 +3,14 @@
 #ifndef VIDEO_CMDLINE_H
 #define VIDEO_CMDLINE_H
 
+#include <linux/kconfig.h>
 #include <linux/types.h>
 
 const char *video_get_options(const char *name);
 
+#if IS_ENABLED(CONFIG_FB_CORE)
 /* exported for compatibility with fbdev; don't use in new code */
 bool __video_get_options(const char *name, const char **option, bool is_of);
+#endif
 
 #endif