mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] power: supply: max8997-charger: Use module_platform_driver()
@ 2020-11-09 19:43 Timon Baetz
  2020-11-09 19:43 ` [PATCH 2/3] power: supply: max8997-charger: Fix platform data retrieval Timon Baetz
  2020-11-09 19:43 ` [PATCH 3/3] power: supply: max8997-charger: Improve getting charger status Timon Baetz
  0 siblings, 2 replies; 3+ messages in thread
From: Timon Baetz @ 2020-11-09 19:43 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Timon Baetz, linux-pm, linux-kernel

Replace register and unregister function calls with
module_platform_driver().

Signed-off-by: Timon Baetz <timon.baetz@protonmail.com>
---
 drivers/power/supply/max8997_charger.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/power/supply/max8997_charger.c b/drivers/power/supply/max8997_charger.c
index f5e84cd47924..94d1ade047a7 100644
--- a/drivers/power/supply/max8997_charger.c
+++ b/drivers/power/supply/max8997_charger.c
@@ -168,18 +168,7 @@ static struct platform_driver max8997_battery_driver = {
 	.probe = max8997_battery_probe,
 	.id_table = max8997_battery_id,
 };
-
-static int __init max8997_battery_init(void)
-{
-	return platform_driver_register(&max8997_battery_driver);
-}
-subsys_initcall(max8997_battery_init);
-
-static void __exit max8997_battery_cleanup(void)
-{
-	platform_driver_unregister(&max8997_battery_driver);
-}
-module_exit(max8997_battery_cleanup);
+module_platform_driver(max8997_battery_driver);
 
 MODULE_DESCRIPTION("MAXIM 8997/8966 battery control driver");
 MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
-- 
2.25.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-09 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 19:43 [PATCH 1/3] power: supply: max8997-charger: Use module_platform_driver() Timon Baetz
2020-11-09 19:43 ` [PATCH 2/3] power: supply: max8997-charger: Fix platform data retrieval Timon Baetz
2020-11-09 19:43 ` [PATCH 3/3] power: supply: max8997-charger: Improve getting charger status Timon Baetz

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®