From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Ashish Jangam <ashish.jangam@kpitcummins.com>,
Anton Vorontsov <cbouatmailru@gmail.com>,
David Dajun Chen <dchen@diasemi.com>
Subject: [PATCH 3/3] power_supply: da9052-battery: Convert to use module_platform_driver
Date: Wed, 11 Jan 2012 15:45:56 +0800 [thread overview]
Message-ID: <1326267956.15588.4.camel@phoenix> (raw)
In-Reply-To: <1326267824.15588.2.camel@phoenix>
Use the module_platform_driver() macro which makes the code smaller and a bit
simpler.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/power/da9052-battery.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/drivers/power/da9052-battery.c b/drivers/power/da9052-battery.c
index daf52a4..d648ba9 100644
--- a/drivers/power/da9052-battery.c
+++ b/drivers/power/da9052-battery.c
@@ -648,17 +648,7 @@ static struct platform_driver da9052_bat_driver = {
},
};
-static int __init da9052_bat_init(void)
-{
- return platform_driver_register(&da9052_bat_driver);
-}
-module_init(da9052_bat_init);
-
-static void __exit da9052_bat_exit(void)
-{
- platform_driver_unregister(&da9052_bat_driver);
-}
-module_exit(da9052_bat_exit);
+module_platform_driver(da9052_bat_driver);
MODULE_DESCRIPTION("DA9052 BAT Device Driver");
MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
--
1.7.5.4
next prev parent reply other threads:[~2012-01-11 7:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 7:43 [PATCH 1/3] power_supply: da9052-battery: Add missing platform_set_drvdata Axel Lin
2012-01-11 7:44 ` [PATCH 2/3] power_supply: da9052-battery: Fix a memory leak when unload the module Axel Lin
2012-01-11 7:45 ` Axel Lin [this message]
2012-03-15 16:52 ` [PATCH 1/3] power_supply: da9052-battery: Add missing platform_set_drvdata Anton Vorontsov
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=1326267956.15588.4.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=ashish.jangam@kpitcummins.com \
--cc=cbouatmailru@gmail.com \
--cc=dchen@diasemi.com \
--cc=linux-kernel@vger.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