[PATCH] backlight: aat2870-backlight: convert to subsys_platform_driver()
From: Brian Masney
Date: Thu Nov 05 2026 - 20:28:52 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/video/backlight/aat2870_bl.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/video/backlight/aat2870_bl.c b/drivers/video/backlight/aat2870_bl.c
index 8b790df1e842..2428427e11aa 100644
--- a/drivers/video/backlight/aat2870_bl.c
+++ b/drivers/video/backlight/aat2870_bl.c
@@ -189,17 +189,7 @@ static struct platform_driver aat2870_bl_driver = {
.remove = aat2870_bl_remove,
};
-static int __init aat2870_bl_init(void)
-{
- return platform_driver_register(&aat2870_bl_driver);
-}
-subsys_initcall(aat2870_bl_init);
-
-static void __exit aat2870_bl_exit(void)
-{
- platform_driver_unregister(&aat2870_bl_driver);
-}
-module_exit(aat2870_bl_exit);
+subsys_platform_driver(aat2870_bl_driver);
MODULE_DESCRIPTION("AnalogicTech AAT2870 Backlight");
MODULE_LICENSE("GPL");
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261105-backlight-subsys-17a9a6db80be
Best regards,
--
Brian Masney <bmasney@xxxxxxxxxx>