[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1353995926-4621-3-git-send-email-sachin.kamat@linaro.org>
Date: Tue, 27 Nov 2012 11:28:45 +0530
From: Sachin Kamat <sachin.kamat@...aro.org>
To: linux-kernel@...r.kernel.org
Cc: cbou@...l.ru, cbouatmailru@...il.com, dwmw2@...radead.org,
sachin.kamat@...aro.org, patches@...aro.org
Subject: [PATCH 2/3] power: bq2415x_charger: Use module_i2c_driver
module_i2c_driver() makes the code simpler by eliminating
module_init and module_exit calls.
Signed-off-by: Sachin Kamat <sachin.kamat@...aro.org>
---
drivers/power/bq2415x_charger.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c
index 2d1b568..54c4ebf 100644
--- a/drivers/power/bq2415x_charger.c
+++ b/drivers/power/bq2415x_charger.c
@@ -1652,17 +1652,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@...il.com>");
MODULE_DESCRIPTION("bq2415x charger driver");
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists