summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/adv7183.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-10-08 15:13:41 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-25 21:08:46 +0200
commit01aea0bfd8dfa8bc868df33904461984bb10a87a (patch)
tree9612efd3811bb3bbd161386a15d036916464b49d /drivers/media/i2c/adv7183.c
parent[media] i2c: vs6624: use module_i2c_driver to simplify the code (diff)
downloadlinux-01aea0bfd8dfa8bc868df33904461984bb10a87a.tar.xz
linux-01aea0bfd8dfa8bc868df33904461984bb10a87a.zip
[media] i2c: adv7183: 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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c/adv7183.c')
-rw-r--r--drivers/media/i2c/adv7183.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/media/i2c/adv7183.c b/drivers/media/i2c/adv7183.c
index e1d4c89d7140..10c3c1db4cdd 100644
--- a/drivers/media/i2c/adv7183.c
+++ b/drivers/media/i2c/adv7183.c
@@ -681,18 +681,7 @@ static struct i2c_driver adv7183_driver = {
.id_table = adv7183_id,
};
-static __init int adv7183_init(void)
-{
- return i2c_add_driver(&adv7183_driver);
-}
-
-static __exit void adv7183_exit(void)
-{
- i2c_del_driver(&adv7183_driver);
-}
-
-module_init(adv7183_init);
-module_exit(adv7183_exit);
+module_i2c_driver(adv7183_driver);
MODULE_DESCRIPTION("Analog Devices ADV7183 video decoder driver");
MODULE_AUTHOR("Scott Jiang <Scott.Jiang.Linux@gmail.com>");