From: Thomas Zimmermann <tzimmermann@suse.de>
To: javierm@redhat.com, deller@gmx.de, daniel@ffwll.ch, airlied@gmail.com
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH v2 2/3] video/cmdline: Hide __video_get_options() behind CONFIG_FB_CORE
Date: Thu, 18 Jan 2024 10:05:27 +0100 [thread overview]
Message-ID: <20240118090721.7995-3-tzimmermann@suse.de> (raw)
In-Reply-To: <20240118090721.7995-1-tzimmermann@suse.de>
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>
---
drivers/video/cmdline.c | 2 ++
include/video/cmdline.h | 3 +++
2 files changed, 5 insertions(+)
diff --git a/drivers/video/cmdline.c b/drivers/video/cmdline.c
index d3d257489c3d..49ee3fb4951a 100644
--- a/drivers/video/cmdline.c
+++ b/drivers/video/cmdline.c
@@ -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
diff --git a/include/video/cmdline.h b/include/video/cmdline.h
index 77292d1d6173..76649465bb08 100644
--- a/include/video/cmdline.h
+++ b/include/video/cmdline.h
@@ -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
--
2.43.0
next prev parent reply other threads:[~2024-01-18 9:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 9:05 [PATCH v2 0/3] video: Simplify Kconfig options Thomas Zimmermann
2024-01-18 9:05 ` [PATCH v2 1/3] video/cmdline: Introduce CONFIG_VIDEO for video= parameter Thomas Zimmermann
2024-01-18 9:05 ` Thomas Zimmermann [this message]
2024-01-18 9:05 ` [PATCH v2 3/3] video/nomodeset: Select nomodeset= parameter with CONFIG_VIDEO Thomas Zimmermann
2024-01-18 14:17 ` [PATCH v2 0/3] video: Simplify Kconfig options Daniel Vetter
2024-01-23 9:23 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240118090721.7995-3-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).