@@ -393,9 +393,13 @@ config PARTITION_PERCPU
bool
config STM32MP_EXTI
- bool
+ tristate "STM32MP extended interrupts and event controller"
+ depends on (ARCH_STM32 && !ARM_SINGLE_ARMV7M) || COMPILE_TEST
+ default y
select IRQ_DOMAIN
select GENERIC_IRQ_CHIP
+ help
+ Support STM32MP EXTI (extended interrupts and event) controller.
config STM32_EXTI
bool
@@ -730,15 +730,8 @@ static struct platform_driver stm32mp_exti_driver = {
},
};
-static int __init stm32mp_exti_arch_init(void)
-{
- return platform_driver_register(&stm32mp_exti_driver);
-}
-
-static void __exit stm32mp_exti_arch_exit(void)
-{
- return platform_driver_unregister(&stm32mp_exti_driver);
-}
+module_platform_driver(stm32mp_exti_driver);
-arch_initcall(stm32mp_exti_arch_init);
-module_exit(stm32mp_exti_arch_exit);
+MODULE_AUTHOR("Maxime Coquelin <mcoquelin.stm32@gmail.com>");
+MODULE_DESCRIPTION("STM32MP EXTI driver");
+MODULE_LICENSE("GPL");
Allow build the driver as a module by adding the necessarily hooks in Kconfig and in the driver's code. Since all the probe dependencies linked to this driver has already been fixed, ignore the no more relevant 'arch_initcall'. Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com> --- drivers/irqchip/Kconfig | 6 +++++- drivers/irqchip/irq-stm32mp-exti.c | 15 ++++----------- 2 files changed, 9 insertions(+), 12 deletions(-)