提交 dbfd5ccc 编写于 作者: W Wei Yongjun 提交者: Greg Kroah-Hartman

w1/ds2482: use module_i2c_driver to simplify the code

Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 35299f88
......@@ -505,19 +505,8 @@ static int ds2482_remove(struct i2c_client *client)
return 0;
}
static int __init sensors_ds2482_init(void)
{
return i2c_add_driver(&ds2482_driver);
}
static void __exit sensors_ds2482_exit(void)
{
i2c_del_driver(&ds2482_driver);
}
module_i2c_driver(ds2482_driver);
MODULE_AUTHOR("Ben Gardner <bgardner@wabtec.com>");
MODULE_DESCRIPTION("DS2482 driver");
MODULE_LICENSE("GPL");
module_init(sensors_ds2482_init);
module_exit(sensors_ds2482_exit);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册