提交 1d3c7f56 编写于 作者: S Sachin Kamat 提交者: Lee Jones

mfd: menelaus: Use module_i2c_driver

module_i2c_driver simplifies the code by eliminating
boilerplate code.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 8320513e
...@@ -1287,29 +1287,8 @@ static struct i2c_driver menelaus_i2c_driver = { ...@@ -1287,29 +1287,8 @@ static struct i2c_driver menelaus_i2c_driver = {
.id_table = menelaus_id, .id_table = menelaus_id,
}; };
static int __init menelaus_init(void) module_i2c_driver(menelaus_i2c_driver);
{
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_AUTHOR("Texas Instruments, Inc. (and others)"); MODULE_AUTHOR("Texas Instruments, Inc. (and others)");
MODULE_DESCRIPTION("I2C interface for Menelaus."); MODULE_DESCRIPTION("I2C interface for Menelaus.");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
module_init(menelaus_init);
module_exit(menelaus_exit);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册