gpio: ppc44x: Use module platform driver helper for GPIO

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 <rosenp@gmail.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260803223539.86303-4-rosenp@gmail.com
This commit is contained in:
Rosen Penev
2026-08-03 15:35:34 -07:00
committed by Madhavan Srinivasan
parent f9476e237a
commit f17b0ef859

View File

@@ -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);