[PATCH] wifi: morsemicro: MM81X should be invisible and selected by its users

Geert Uytterhoeven <[email protected]> Thu, 6 Aug 2026 12:05:42 +0200
Newsgroups org.kernel.vger.linux-wireless,org.kernel.vger.linux-kernel
Message-ID <3415bda97c2faf7c56eff7fe79a91b218d0d6731.1786010705.git.geert+renesas@glider.be>
Morse Micro MM81x wireless devices can have either SDIO or USB
interfaces.  Hence there is no point in asking the user about these
devices when configuring a kernel without MMC or USB support.

Fix this by making the core driver symbol invisible, and selecting it by
its users when needed.

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
Alternatively, MM81X could depend on "MMC || USB", at the expense of
asking the user one more question.
---
 drivers/net/wireless/morsemicro/mm81x/Kconfig | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/morsemicro/mm81x/Kconfig b/drivers/net/wireless/morsemicro/mm81x/Kconfig
index 33cdcc0df4de2e00..4c4fae77ff67be48 100644
--- a/drivers/net/wireless/morsemicro/mm81x/Kconfig
+++ b/drivers/net/wireless/morsemicro/mm81x/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 config MM81X
-	tristate "Morse Micro MM81x wireless devices"
+	tristate "Morse Micro MM81x wireless devices" if COMPILE_TEST
 	depends on MAC80211
 	select FW_LOADER
 	select CRC7
@@ -11,14 +11,16 @@ config MM81X
 
 config MM81X_USB
 	tristate "Morse Micro MM81x USB support"
-	depends on MM81X && USB
+	depends on MAC80211 && USB
+	select MM81X
 	help
 	  This module adds support for the USB interface of
 	  devices using the Morse Micro MM81x chipset.
 
 config MM81X_SDIO
 	tristate "Morse Micro MM81x SDIO support"
-	depends on MM81X && MMC
+	depends on MAC80211 && MMC
+	select MM81X
 	help
 	  This module adds support for the SDIO interface of
 	  devices using the Morse Micro MM81x chipset.
-- 
2.43.0