summaryrefslogtreecommitdiff
path: root/drivers/mfd/menelaus.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-05-29 15:43:22 +0400
committerLee Jones <lee.jones@linaro.org>2014-06-03 11:12:47 +0400
commit1d3c7f56614dcd29c7819368cac2a9388fb13b69 (patch)
tree849025aedef9f199b3cb65cad26df549d0266a92 /drivers/mfd/menelaus.c
parent8320513e8b4c815206b5cc60f92a71c9ca5c439e (diff)
downloadlinux-1d3c7f56614dcd29c7819368cac2a9388fb13b69.tar.xz
mfd: menelaus: Use module_i2c_driver
module_i2c_driver simplifies the code by eliminating boilerplate code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/menelaus.c')
-rw-r--r--drivers/mfd/menelaus.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
index ad25bfa3fb02..5e2667afe2bc 100644
--- a/drivers/mfd/menelaus.c
+++ b/drivers/mfd/menelaus.c
@@ -1287,29 +1287,8 @@ static struct i2c_driver menelaus_i2c_driver = {
.id_table = menelaus_id,
};
-static int __init menelaus_init(void)
-{
- int res;
-
- res = i2c_add_driver(&menelaus_i2c_driver);
- if (res < 0) {
- pr_err(DRIVER_NAME ": driver registration failed\n");
- return res;
- }
-
- return 0;
-}
-
-static void __exit menelaus_exit(void)
-{
- i2c_del_driver(&menelaus_i2c_driver);
-
- /* FIXME: Shutdown menelaus parts that can be shut down */
-}
+module_i2c_driver(menelaus_i2c_driver);
MODULE_AUTHOR("Texas Instruments, Inc. (and others)");
MODULE_DESCRIPTION("I2C interface for Menelaus.");
MODULE_LICENSE("GPL");
-
-module_init(menelaus_init);
-module_exit(menelaus_exit);