public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fbdev: Have CONFIG_FB_NOTIFY be tristate
@ 2024-05-03 19:28 Florian Fainelli
  2024-05-03 19:45 ` Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Florian Fainelli @ 2024-05-03 19:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Daniel Vetter, Helge Deller, Thomas Zimmermann,
	Javier Martinez Canillas, Sam Ravnborg, Arnd Bergmann,
	open list:FRAMEBUFFER LAYER, open list:FRAMEBUFFER LAYER

Android devices in recovery mode make use of a framebuffer device to
provide an user interface. In a GKI configuration that has CONFIG_FB=m,
but CONFIG_FB_NOTIFY=y, loading the fb.ko module will fail with:

fb: Unknown symbol fb_notifier_call_chain (err -2)

Have CONFIG_FB_NOTIFY be tristate, just like CONFIG_FB such that both
can be loaded as module with fb_notify.ko first, and fb.ko second.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 drivers/video/fbdev/core/Kconfig     | 2 +-
 drivers/video/fbdev/core/fb_notify.c | 3 +++
 include/linux/fb.h                   | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig
index db09fe87fcd4..036af8b5914a 100644
--- a/drivers/video/fbdev/core/Kconfig
+++ b/drivers/video/fbdev/core/Kconfig
@@ -8,7 +8,7 @@ config FB_CORE
 	tristate
 
 config FB_NOTIFY
-	bool
+	tristate
 
 config FIRMWARE_EDID
 	bool "Enable firmware EDID"
diff --git a/drivers/video/fbdev/core/fb_notify.c b/drivers/video/fbdev/core/fb_notify.c
index 10e3b9a74adc..ef707e092344 100644
--- a/drivers/video/fbdev/core/fb_notify.c
+++ b/drivers/video/fbdev/core/fb_notify.c
@@ -52,3 +52,6 @@ int fb_notifier_call_chain(unsigned long val, void *v)
 	return blocking_notifier_call_chain(&fb_notifier_list, val, v);
 }
 EXPORT_SYMBOL_GPL(fb_notifier_call_chain);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Frame buffer notifier support");
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 0dd27364d56f..8c7ae5997278 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -156,7 +156,7 @@ struct fb_blit_caps {
 	u32 flags;
 };
 
-#ifdef CONFIG_FB_NOTIFY
+#if IS_ENABLED(CONFIG_FB_NOTIFY)
 extern int fb_register_client(struct notifier_block *nb);
 extern int fb_unregister_client(struct notifier_block *nb);
 extern int fb_notifier_call_chain(unsigned long val, void *v);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-05-08 21:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-03 19:28 [PATCH] fbdev: Have CONFIG_FB_NOTIFY be tristate Florian Fainelli
2024-05-03 19:45 ` Arnd Bergmann
2024-05-03 20:22   ` Florian Fainelli
2024-05-06 13:14     ` Daniel Vetter
2024-05-06 14:53       ` Arnd Bergmann
2024-05-06 15:14         ` Arnd Bergmann
2024-05-07 11:10         ` Daniel Vetter
2024-05-07 11:44           ` Arnd Bergmann
2024-05-08 18:37             ` Florian Fainelli
2024-05-08 19:35               ` Arnd Bergmann
2024-05-08 20:36                 ` Sam Ravnborg
2024-05-08 21:05                   ` Arnd Bergmann
2024-05-04 11:46 ` kernel test robot
2024-05-04 14:42 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox