summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorTimon Baetz <timon.baetz@protonmail.com>2020-11-09 19:43:12 +0000
committerSebastian Reichel <sebastian.reichel@collabora.com>2020-11-30 01:56:17 +0100
commit70bd58fff29dc4c53cfea2da01f05d2377d2ffa9 (patch)
tree5316dbe5ef88c23c06eaac0ffc562fbd0bcf9a82 /drivers/power
parent91bc9e1938c4682972541cba784f335af2b81f66 (diff)
downloadlinux-70bd58fff29dc4c53cfea2da01f05d2377d2ffa9.tar.bz2
power: supply: max8997-charger: Use module_platform_driver()
Replace register and unregister function calls with module_platform_driver(). Signed-off-by: Timon Baetz <timon.baetz@protonmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/max8997_charger.c13
1 files changed, 1 insertions, 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>");