linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] power: bq2414x: use module_i2c_driver macro
@ 2012-12-08 17:16 Devendra Naga
  0 siblings, 0 replies; only message in thread
From: Devendra Naga @ 2012-12-08 17:16 UTC (permalink / raw)
  To: Anton Vorontsov, David Woodhouse, linux-pm; +Cc: Devendra Naga

use the module_i2c_driver macro and reduce code and also remove the
duplicated module init and exit places.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
---
 drivers/power/bq2415x_charger.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c
index ee842b3..b05df0a 100644
--- a/drivers/power/bq2415x_charger.c
+++ b/drivers/power/bq2415x_charger.c
@@ -1653,18 +1653,7 @@ static struct i2c_driver bq2415x_driver = {
 	.id_table = bq2415x_i2c_id_table,
 };
 
-static int __init bq2415x_init(void)
-{
-	return i2c_add_driver(&bq2415x_driver);
-}
-module_init(bq2415x_init);
-
-static void __exit bq2415x_exit(void)
-{
-	i2c_del_driver(&bq2415x_driver);
-}
-module_exit(bq2415x_exit);
-
+module_i2c_driver(bq2415x_driver);
 MODULE_AUTHOR("Pali Rohár <pali.rohar@gmail.com>");
 MODULE_DESCRIPTION("bq2415x charger driver");
 MODULE_LICENSE("GPL");
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-08 17:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-08 17:16 [PATCH] power: bq2414x: use module_i2c_driver macro Devendra Naga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).