diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-08 09:13:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-25 15:08:17 -0400 |
commit | 9ac1510407cbadb2ff6790c296617405fda27895 (patch) | |
tree | 93ef8dc60693e075bb11da94c0434590e30bfac6 /drivers/media | |
parent | 74ffbf86db2b561f6a035ee63110ae3721e7a36a (diff) |
[media] i2c: vs6624: 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')
-rw-r--r-- | drivers/media/i2c/vs6624.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/media/i2c/vs6624.c b/drivers/media/i2c/vs6624.c index 42ae9dc9c574..f434a19b9bcb 100644 --- a/drivers/media/i2c/vs6624.c +++ b/drivers/media/i2c/vs6624.c | |||
@@ -910,18 +910,7 @@ static struct i2c_driver vs6624_driver = { | |||
910 | .id_table = vs6624_id, | 910 | .id_table = vs6624_id, |
911 | }; | 911 | }; |
912 | 912 | ||
913 | static __init int vs6624_init(void) | 913 | module_i2c_driver(vs6624_driver); |
914 | { | ||
915 | return i2c_add_driver(&vs6624_driver); | ||
916 | } | ||
917 | |||
918 | static __exit void vs6624_exit(void) | ||
919 | { | ||
920 | i2c_del_driver(&vs6624_driver); | ||
921 | } | ||
922 | |||
923 | module_init(vs6624_init); | ||
924 | module_exit(vs6624_exit); | ||
925 | 914 | ||
926 | MODULE_DESCRIPTION("VS6624 sensor driver"); | 915 | MODULE_DESCRIPTION("VS6624 sensor driver"); |
927 | MODULE_AUTHOR("Scott Jiang <Scott.Jiang.Linux@gmail.com>"); | 916 | MODULE_AUTHOR("Scott Jiang <Scott.Jiang.Linux@gmail.com>"); |