* [PATCH] backlight: aat2870-backlight: convert to subsys_platform_driver()
@ 2026-11-06 1:28 Brian Masney
0 siblings, 0 replies; 2+ messages in thread
From: Brian Masney @ 2026-11-06 1:28 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller
Cc: dri-devel, linux-fbdev, linux-kernel, Brian Masney
Reduce boilerplate code in this driver and convert it over to use
the macro subsys_platform_driver().
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
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@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] backlight: aat2870-backlight: Convert to subsys_platform_driver()
@ 2026-11-04 11:32 Peng Fan (OSS)
0 siblings, 0 replies; 2+ messages in thread
From: Peng Fan (OSS) @ 2026-11-04 11:32 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller
Cc: dri-devel, linux-fbdev, linux-kernel
From: Peng Fan <peng.fan@nxp.com>
Replace the open-coded subsys_initcall()/module_exit() platform driver
registration with subsys_platform_driver().
No functional change.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/video/backlight/aat2870_bl.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/video/backlight/aat2870_bl.c b/drivers/video/backlight/aat2870_bl.c
index 8b790df1e842..d28f54ec5f7e 100644
--- a/drivers/video/backlight/aat2870_bl.c
+++ b/drivers/video/backlight/aat2870_bl.c
@@ -188,18 +188,7 @@ static struct platform_driver aat2870_bl_driver = {
.probe = aat2870_bl_probe,
.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");
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-06 1:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-06 1:28 [PATCH] backlight: aat2870-backlight: convert to subsys_platform_driver() Brian Masney
-- strict thread matches above, loose matches on Subject: below --
2026-11-04 11:32 [PATCH] backlight: aat2870-backlight: Convert " Peng Fan (OSS)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®