[PATCH 2/2] mfd: tps65911-comparator: convert to subsys_platform_driver()

From: Brian Masney

Date: Fri Nov 06 2026 - 19:22:05 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/tps65911-comparator.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/mfd/tps65911-comparator.c b/drivers/mfd/tps65911-comparator.c
index cc8545a972bc..db787a4c765a 100644
--- a/drivers/mfd/tps65911-comparator.c
+++ b/drivers/mfd/tps65911-comparator.c
@@ -157,17 +157,7 @@ static struct platform_driver tps65911_comparator_driver = {
.remove = tps65911_comparator_remove,
};

-static int __init tps65911_comparator_init(void)
-{
- return platform_driver_register(&tps65911_comparator_driver);
-}
-subsys_initcall(tps65911_comparator_init);
-
-static void __exit tps65911_comparator_exit(void)
-{
- platform_driver_unregister(&tps65911_comparator_driver);
-}
-module_exit(tps65911_comparator_exit);
+subsys_platform_driver(tps65911_comparator_driver);

MODULE_AUTHOR("Jorge Eduardo Candelaria <jedu@xxxxxxxxxxxxxxx>");
MODULE_DESCRIPTION("TPS65911 comparator driver");

--
2.56.0