[PATCH] dmaengine: qcom: gpi: convert to subsys_platform_driver()
From: Brian Masney
Date: Fri Nov 06 2026 - 20:04:14 EST
Reduce boilerplate code in this driver and convert it over to use
the macro subsys_platform_driver().
Note that this driver is configured in the Kconfig to be a tristate,
the driver doesn't have suppress_bind_attrs set, and there is no __exit
function defined. This change will add an __exit function that
unregisters the platform driver.
Signed-off-by: Brian Masney <bmasney@xxxxxxxxxx>
---
drivers/dma/qcom/gpi.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
index c41bfac65ddf..d6c76ce1846e 100644
--- a/drivers/dma/qcom/gpi.c
+++ b/drivers/dma/qcom/gpi.c
@@ -2325,11 +2325,7 @@ static struct platform_driver gpi_driver = {
},
};
-static int __init gpi_init(void)
-{
- return platform_driver_register(&gpi_driver);
-}
-subsys_initcall(gpi_init)
+subsys_platform_driver(gpi_driver);
MODULE_DESCRIPTION("QCOM GPI DMA engine driver");
MODULE_LICENSE("GPL v2");
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261106-dma-gpi-subsys-594acc21c25b
Best regards,
--
Brian Masney <bmasney@xxxxxxxxxx>