From: Timon Baetz <timon.baetz@protonmail.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: Timon Baetz <timon.baetz@protonmail.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] power: supply: max8997-charger: Use module_platform_driver()
Date: Mon, 09 Nov 2020 19:43:12 +0000 [thread overview]
Message-ID: <20201109194251.562203-1-timon.baetz@protonmail.com> (raw)
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
next reply other threads:[~2020-11-09 19:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 19:43 Timon Baetz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201109194251.562203-1-timon.baetz@protonmail.com \
--to=timon.baetz@protonmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®