[PATCH] ARM: OMAP2+: display: use IS_ENABLED(CONFIG_FB_OMAP2)

Pengpeng Hou hppiscas at 163.com
Thu Dec 3 18:33:13 PST 2026


OMAP platform setup does not create the display helper devices for a
modular omapfb driver. The helper registration is built into platform
code and is needed before the later driver can match.

Use IS_ENABLED while retaining the checks for a supported, available DSS
device tree node.

The issue was found by our static-analysis tool and manually reviewed.

Fixes: 5ce783025c82 ("ARM: OMAP2+: Don't register omapdss device for omapdrm")
Signed-off-by: Pengpeng Hou <hppiscas at 163.com>
---
The original patch was prepared with Gemini. Codex assisted with this
review and revision (Assisted-by: gpt 5).
Built the ARM OMAP display.o target with Clang 18 and W=1, FB_OMAP2=m
and DRM_OMAP disabled. The omap_display_device symbol was absent before
the change and present afterwards with the same configuration. No panel
was exercised.

 arch/arm/mach-omap2/display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index dbec3bb9fbf469492856cc1e35e472ddc62b0dd2..0b96e7da2eac45548088093264cfef7dc5e8ec90 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -57,7 +57,7 @@
  */
 #define FRAMEDONE_IRQ_TIMEOUT		100
 
-#if defined(CONFIG_FB_OMAP2)
+#if IS_ENABLED(CONFIG_FB_OMAP2)
 static struct platform_device omap_display_device = {
 	.name          = "omapdss",
 	.id            = -1,

base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106




More information about the linux-arm-kernel mailing list