Skip to contentSkip to conversation

mfd: convert to subsys_platform_driver()

PATCH In review Brian Masney 4 participants 7 messages Nov 7 – Nov 18

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover mfd: convert to subsys_platform_driver()

Reduce boilerplate code in these drivers and convert them over to use the macro subsys_platform_driver().

---
Brian Masney (2):
mfd: qcom-pm8xxx: convert to subsys_platform_driver()
mfd: tps65911-comparator: convert to subsys_platform_driver()

 drivers/mfd/qcom-pm8xxx.c         | 12 +-----------
 drivers/mfd/tps65911-comparator.c | 12 +-----------
 2 files changed, 2 insertions(+), 22 deletions(-)

---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261106-mfd-subsys-63dc5bb82f83

Best regards,

Signature · 1 line
Brian Masney <[email protected]>
#1 lore raw

PATCH 1/2 mfd: qcom-pm8xxx: convert to subsys_platform_driver()

Reduce boilerplate code in this driver and convert it over to use the macro subsys_platform_driver().

---
 drivers/mfd/qcom-pm8xxx.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
drivers/mfd/qcom-pm8xxx.c +1 -11
index 0cf374c015ce..14de2a5e6ba6 100644
@@ -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");
Signature · 1 line
2.56.0
#2 lore raw

Re: [PATCH 1/2] mfd: qcom-pm8xxx: convert to subsys_platform_driver()

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] mfd: qcom-pm8xxx: uncapitalized commit subject description --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] mfd: qcom-pm8xxx: uncapitalized commit subject description --

commit 49060bdb25dc221484f1b98aabbb4273d1c20f0f
Author: Brian Masney <[email protected]>

mfd: qcom-pm8xxx: convert to subsys_platform_driver()

This commit replaces the open-coded subsys_initcall() and module_exit() functions in qcom-pm8xxx with the subsys_platform_driver() macro.

Quoted 1 line

mfd: qcom-pm8xxx: convert to subsys_platform_driver()

[Severity: Low]
MFD commit subjects capitalize the description after the prefix, so "convert" should be "Convert":

mfd: qcom-pm8xxx: Convert to subsys_platform_driver()

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#4 lore raw

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

In reply to Brian Masney

Reduce boilerplate code in this driver and convert it over to use the macro subsys_platform_driver().

---
 drivers/mfd/tps65911-comparator.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
drivers/mfd/tps65911-comparator.c +1 -11
index cc8545a972bc..db787a4c765a 100644
@@ -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 <[email protected]>");
 MODULE_DESCRIPTION("TPS65911 comparator driver");
Signature · 1 line
2.56.0
#5 lore raw

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

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] mfd: tps65911-comparator: uncapitalized commit subject description --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] mfd: tps65911-comparator: uncapitalized commit subject description
--

commit 9db162a3501f36e6be987d9956c4bd3a1341e487
Author: Brian Masney <[email protected]>

mfd: tps65911-comparator: convert to subsys_platform_driver()

This commit replaces the manual subsys_initcall() and module_exit() registration functions in the tps65911-comparator driver with the subsys_platform_driver() macro.

Quoted 1 line

mfd: tps65911-comparator: convert to subsys_platform_driver()

[Severity: Low]
This isn't a bug, but MFD commit subjects capitalize the description after the prefix, such as:

mfd: tps65911-comparator: Convert to subsys_platform_driver()

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
maintainer
#6 lore raw
In reply to Brian Masney
Quoted 9 lines · Brian Masney

Reduce boilerplate code in these drivers and convert them over to use the macro subsys_platform_driver().

---
Brian Masney (2):
mfd: qcom-pm8xxx: convert to subsys_platform_driver()
mfd: tps65911-comparator: convert to subsys_platform_driver()

Quoted 7 lines
 drivers/mfd/qcom-pm8xxx.c         | 12 +-----------
 drivers/mfd/tps65911-comparator.c | 12 +-----------
 2 files changed, 2 insertions(+), 22 deletions(-)

---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261106-mfd-subsys-63dc5bb82f83

Looks like you were beaten to it.

Please rebase and see if these issues still exist.

Signature · 1 line
Lee Jones