[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230629121952.10559-13-tzimmermann@suse.de>
Date: Thu, 29 Jun 2023 13:45:51 +0200
From: Thomas Zimmermann <tzimmermann@...e.de>
To: arnd@...db.de, deller@....de, daniel@...ll.ch, airlied@...il.com
Cc: linux-kernel@...r.kernel.org, linux-alpha@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-efi@...r.kernel.org,
linux-csky@...r.kernel.org, linux-hexagon@...r.kernel.org,
linux-ia64@...r.kernel.org, loongarch@...ts.linux.dev,
linux-mips@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org, linux-sh@...r.kernel.org,
sparclinux@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-hyperv@...r.kernel.org, linux-fbdev@...r.kernel.org,
linux-staging@...ts.linux.dev, linux-arch@...r.kernel.org,
Thomas Zimmermann <tzimmermann@...e.de>,
Randy Dunlap <rdunlap@...radead.org>
Subject: [PATCH 12/12] fbdev/core: Define empty fb_firmware_edid() in <linux/fb.h>
Move the empty declaration of fb_firmware_edid() to <linux/fb.h>.
Follow common style and avoid the overhead of exporting the symbol.
No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@...e.de>
Cc: Daniel Vetter <daniel@...ll.ch>
Cc: Helge Deller <deller@....de>
Cc: Randy Dunlap <rdunlap@...radead.org>
---
drivers/video/fbdev/core/fbmon.c | 7 +------
include/linux/fb.h | 10 +++++++++-
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 9ae063021e431..d45bd8a18c2f2 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1496,13 +1496,8 @@ const unsigned char *fb_firmware_edid(struct fb_info *info)
return edid;
}
-#else
-const unsigned char *fb_firmware_edid(struct fb_info *info)
-{
- return NULL;
-}
-#endif
EXPORT_SYMBOL(fb_firmware_edid);
+#endif
EXPORT_SYMBOL(fb_parse_edid);
EXPORT_SYMBOL(fb_edid_to_monspecs);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 5ffd2223326bf..e949532ffc109 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -761,7 +761,6 @@ extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var,
extern int fb_validate_mode(const struct fb_var_screeninfo *var,
struct fb_info *info);
extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var);
-extern const unsigned char *fb_firmware_edid(struct fb_info *info);
extern void fb_edid_to_monspecs(unsigned char *edid,
struct fb_monspecs *specs);
extern void fb_destroy_modedb(struct fb_videomode *modedb);
@@ -774,6 +773,15 @@ extern int of_get_fb_videomode(struct device_node *np,
extern int fb_videomode_from_videomode(const struct videomode *vm,
struct fb_videomode *fbmode);
+#if defined(CONFIG_FIRMWARE_EDID)
+const unsigned char *fb_firmware_edid(struct fb_info *info);
+#else
+static inline const unsigned char *fb_firmware_edid(struct fb_info *info)
+{
+ return NULL;
+}
+#endif
+
/* drivers/video/modedb.c */
#define VESA_MODEDB_SIZE 43
#define DMT_SIZE 0x50
--
2.41.0
Powered by blists - more mailing lists