From: Wei Yongjun Date: Mon, 8 Oct 2012 13:13:41 +0000 (-0300) Subject: [media] i2c: adv7183: use module_i2c_driver to simplify the code X-Git-Tag: v3.9-rc5~2^2~832 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01aea0bfd8dfa8bc868df33904461984bb10a87a;p=platform%2Fkernel%2Flinux-3.10.git [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 Acked-by: Scott Jiang Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/adv7183.c b/drivers/media/i2c/adv7183.c index e1d4c89..10c3c1d 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 ");