[PATCH 1/2] mfd: qcom-pm8xxx: convert to subsys_platform_driver()
From: Brian Masney
Date: Fri Nov 06 2026 - 19:21:51 EST
Reduce boilerplate code in this driver and convert it over to use
the macro subsys_platform_driver().
Signed-off-by: Brian Masney <bmasney@xxxxxxxxxx>
---
drivers/mfd/qcom-pm8xxx.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/mfd/qcom-pm8xxx.c b/drivers/mfd/qcom-pm8xxx.c
index 0cf374c015ce..14de2a5e6ba6 100644
--- a/drivers/mfd/qcom-pm8xxx.c
+++ b/drivers/mfd/qcom-pm8xxx.c
@@ -594,17 +594,7 @@ static struct platform_driver pm8xxx_driver = {
},
};
-static int __init pm8xxx_init(void)
-{
- return platform_driver_register(&pm8xxx_driver);
-}
-subsys_initcall(pm8xxx_init);
-
-static void __exit pm8xxx_exit(void)
-{
- platform_driver_unregister(&pm8xxx_driver);
-}
-module_exit(pm8xxx_exit);
+subsys_platform_driver(pm8xxx_driver);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("PMIC 8xxx core driver");
--
2.56.0