Skip to contentSkip to conversation

irqchip/mediatek: Add OF and HAS_IOMEM dependencies for MTK_IRQ

PATCH New Zyta Szpak 1 participant 1 message Nov 25

Subsystems (2)
lore
Share & tools
lore

Zyta Szpak

author
#0 lore raw

PATCH 1/1 irqchip/mediatek: Add OF and HAS_IOMEM dependencies for MTK_IRQ

Enabling COMPILE_TEST for CONFIG_MTK_IRQ allows building irq-mtk-cirq.c without CONFIG_OF enabled, which causes of_match_node() to expand to NULL and triggers a W=1 compiler warning:

drivers/irqchip/irq-mtk-cirq.c:292:34: warning: unused variable 'mtk_cirq_of_match' [-Wunused-const-variable]

Both irq-mtk-sysirq and irq-mtk-cirq are Device Tree-only MMIO drivers using IRQCHIP_DECLARE() and of_iomap(), so building them without OF or HAS_IOMEM serves no purpose and can fail on !HAS_IOMEM configurations.

Add explicit dependencies on OF and HAS_IOMEM to CONFIG_MTK_IRQ.

Fixes 702ae15488ce ("irqchip/mediatek: Add Kconfig option for MediaTek SYSIRQ and CIRQ")
---
 drivers/irqchip/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/irqchip/Kconfig +1 -0
index 90daedb7554a..9e6658289ae0 100644
@@ -795,6 +795,7 @@ config MST_IRQ
 
 config MTK_IRQ
 	bool "MediaTek Interrupt Controller"
+	depends on OF && HAS_IOMEM
 	depends on ARCH_MEDIATEK || COMPILE_TEST
 	default ARCH_MEDIATEK
 	select IRQ_DOMAIN

base-commit: aab02e49f0b54a0837e58c67651c4abdad1a3208

Signature · 1 line
2.56.1.839.g22a8290db9-goog