[PATCH] Input: n64joy - depend on INPUT=y
From: Pengpeng Hou
Date: Thu Dec 03 2026 - 20:56:29 EST
INPUT_JOYSTICK and the N64 joystick option can both be y when INPUT=m.
The N64 object is then selected for a built-in target below a modular
directory.
Only offer the boolean N64 option with INPUT=y. Leave board selection
and the built-in configuration unchanged.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 3bdffa8ffb45 ("Input: Add N64 controller driver")
Signed-off-by: Pengpeng Hou <hppiscas@xxxxxxx>
---
The original patch was prepared with Gemini. Codex assisted with this
review and revision (Assisted-by: gpt 5).
Using a Nintendo 64 MIPS configuration with VT disabled, Kconfig
previously accepted the driver with INPUT=m. After the change it was
disabled with INPUT=m and remained available with INPUT=y. This was a
Kconfig test using the kernel dummy cross tools; no target binary was
built.
drivers/input/joystick/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
index 7755e5b454d2cb8d1b8ec8295647c4a47d787d8c..6323e398f3580c01cbb432139472d5715533577a 100644
--- a/drivers/input/joystick/Kconfig
+++ b/drivers/input/joystick/Kconfig
@@ -395,7 +395,7 @@ config JOYSTICK_FSIA6B
config JOYSTICK_N64
bool "N64 controller"
- depends on MACH_NINTENDO64
+ depends on MACH_NINTENDO64 && INPUT=y
help
Say Y here if you want enable support for the four
built-in controller ports on the Nintendo 64 console.
base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106