[PATCH DISCUSSION 5/8] gpio: davinci: reset initcall level

Francesco Valla <[email protected]> Wed, 26 Nov 2025 23:54:33 +0100
Newsgroups org.kernel.vger.linux-embedded
Message-ID <[email protected]>
With the fw_devlink infrastracture in place, a custom initcall level is
doing more harm than good, especially in arm64 platforms that use the
(quite old) davinci gpio driver but relies on firmware for power
management and clock setup. Reset the initcall level to the default.

Signed-off-by: Francesco Valla <[email protected]>
---
 drivers/gpio/gpio-davinci.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 538f27209ce718ae49820c6429e3ab9342006825..fd937b07bc52f7dac437ba0503e6013af3196a1b 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -663,22 +663,7 @@ static struct platform_driver davinci_gpio_driver = {
 		.of_match_table	= davinci_gpio_ids,
 	},
 };
-
-/*
- * GPIO driver registration needs to be done before machine_init functions
- * access GPIO. Hence davinci_gpio_drv_reg() is a postcore_initcall.
- */
-static int __init davinci_gpio_drv_reg(void)
-{
-	return platform_driver_register(&davinci_gpio_driver);
-}
-postcore_initcall(davinci_gpio_drv_reg);
-
-static void __exit davinci_gpio_exit(void)
-{
-	platform_driver_unregister(&davinci_gpio_driver);
-}
-module_exit(davinci_gpio_exit);
+module_platform_driver(davinci_gpio_driver);
 
 MODULE_AUTHOR("Jan Kotas <[email protected]>");
 MODULE_DESCRIPTION("DAVINCI GPIO driver");

-- 
2.52.0