Skip to content

Commit

Permalink
video/cmdline: Hide __video_get_options() behind CONFIG_FB_CORE
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Thomas Zimmermann committed Jan 23, 2024
1 parent a3b6792 commit 55ea87a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/video/cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions include/video/cmdline.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 55ea87a

Please sign in to comment.