Skip to content

Commit 0be58e0

Browse files
AntonioBorneoKAGA-KOKO
authored andcommitted
irqchip/stm32mp-exti: Allow building as module
Allow to 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 have already been fixed, remove the not longer relevant 'arch_initcall'. Signed-off-by: Antonio Borneo <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c9d2694 commit 0be58e0

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

drivers/irqchip/Kconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,13 @@ config PARTITION_PERCPU
405405
bool
406406

407407
config STM32MP_EXTI
408-
bool
409-
select IRQ_DOMAIN
408+
tristate "STM32MP extended interrupts and event controller"
409+
depends on (ARCH_STM32 && !ARM_SINGLE_ARMV7M) || COMPILE_TEST
410+
default y
411+
select IRQ_DOMAIN_HIERARCHY
410412
select GENERIC_IRQ_CHIP
413+
help
414+
Support STM32MP EXTI (extended interrupts and event) controller.
411415

412416
config STM32_EXTI
413417
bool

drivers/irqchip/irq-stm32mp-exti.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -722,15 +722,8 @@ static struct platform_driver stm32mp_exti_driver = {
722722
},
723723
};
724724

725-
static int __init stm32mp_exti_arch_init(void)
726-
{
727-
return platform_driver_register(&stm32mp_exti_driver);
728-
}
729-
730-
static void __exit stm32mp_exti_arch_exit(void)
731-
{
732-
return platform_driver_unregister(&stm32mp_exti_driver);
733-
}
725+
module_platform_driver(stm32mp_exti_driver);
734726

735-
arch_initcall(stm32mp_exti_arch_init);
736-
module_exit(stm32mp_exti_arch_exit);
727+
MODULE_AUTHOR("Maxime Coquelin <[email protected]>");
728+
MODULE_DESCRIPTION("STM32MP EXTI driver");
729+
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)