Thread (10 messages) flat view 10 messages, 2 authors, 42m ago

[PATCHv2 3/8] gpio: ppc44x: Use module platform driver helper for GPIO

From: Rosen Penev <hidden>
Date: 2026-08-03 22:35:47
Also in: linux-gpio, lkml
Subsystem: gpio subsystem, the rest · Maintainers: Linus Walleij, Bartosz Golaszewski, Linus Torvalds

Replace the open-coded arch initcall registration with
module_platform_driver(). The initcall level changes from
arch_initcall to device_initcall, which is safe since the
driver no longer needs architecture-specific ordering.

Added MODULE info as a result, otherwise these warnings appear

ERROR: modpost: missing MODULE_LICENSE() in drivers/gpio/gpio-ppc4xx.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpio/gpio-ppc4xx.o

Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <redacted>
---
 drivers/gpio/gpio-ppc44x.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/gpio-ppc44x.c b/drivers/gpio/gpio-ppc44x.c
index 9b874ff8b124..99fb11cd7966 100644
--- a/drivers/gpio/gpio-ppc44x.c
+++ b/drivers/gpio/gpio-ppc44x.c
@@ -204,8 +204,7 @@ static struct platform_driver ppc44x_gpio_driver = {
 	},
 };
 
-static int __init ppc44x_gpio_init(void)
-{
-	return platform_driver_register(&ppc44x_gpio_driver);
-}
-arch_initcall(ppc44x_gpio_init);
+MODULE_DESCRIPTION("PPC44x gpio driver");
+MODULE_LICENSE("GPL");
+
+module_platform_driver(ppc44x_gpio_driver);
-- 
2.55.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help