[media] staging :go700: use module_i2c_driver to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 8 Oct 2012 11:56:11 +0000 (08:56 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 25 Oct 2012 19:07:25 +0000 (17:07 -0200)
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/go7007/s2250-board.c
drivers/staging/media/go7007/wis-ov7640.c
drivers/staging/media/go7007/wis-saa7113.c
drivers/staging/media/go7007/wis-saa7115.c
drivers/staging/media/go7007/wis-sony-tuner.c
drivers/staging/media/go7007/wis-tw2804.c
drivers/staging/media/go7007/wis-tw9903.c
drivers/staging/media/go7007/wis-uda1342.c

index 014d38410c99bec9e100132fa875abd7938a33a9..b3974100c6cdccd0899da64fa8d5a2d9915365aa 100644 (file)
@@ -688,15 +688,4 @@ static struct i2c_driver s2250_driver = {
        .id_table       = s2250_id,
 };
 
-static __init int init_s2250(void)
-{
-       return i2c_add_driver(&s2250_driver);
-}
-
-static __exit void exit_s2250(void)
-{
-       i2c_del_driver(&s2250_driver);
-}
-
-module_init(init_s2250);
-module_exit(exit_s2250);
+module_i2c_driver(s2250_driver);
index 6bc9470fecb6f13de14d8bb1106a5209525f1102..3aaeb91cc554b3f19453b8cedced3973dad30137 100644 (file)
@@ -92,17 +92,6 @@ static struct i2c_driver wis_ov7640_driver = {
        .id_table       = wis_ov7640_id,
 };
 
-static int __init wis_ov7640_init(void)
-{
-       return i2c_add_driver(&wis_ov7640_driver);
-}
-
-static void __exit wis_ov7640_cleanup(void)
-{
-       i2c_del_driver(&wis_ov7640_driver);
-}
-
-module_init(wis_ov7640_init);
-module_exit(wis_ov7640_cleanup);
+module_i2c_driver(wis_ov7640_driver);
 
 MODULE_LICENSE("GPL v2");
index 05e0e108386427b4ee22677707f373fd699bda65..f6b6ae8a83927f88d82a30c394cfd08b923bf944 100644 (file)
@@ -320,17 +320,6 @@ static struct i2c_driver wis_saa7113_driver = {
        .id_table       = wis_saa7113_id,
 };
 
-static int __init wis_saa7113_init(void)
-{
-       return i2c_add_driver(&wis_saa7113_driver);
-}
-
-static void __exit wis_saa7113_cleanup(void)
-{
-       i2c_del_driver(&wis_saa7113_driver);
-}
-
-module_init(wis_saa7113_init);
-module_exit(wis_saa7113_cleanup);
+module_i2c_driver(wis_saa7113_driver);
 
 MODULE_LICENSE("GPL v2");
index 46cff59e28b7faddddd41c259c3d56815dc446cc..47a3146e83af52940fb6365b3857ed6a39938f56 100644 (file)
@@ -453,17 +453,6 @@ static struct i2c_driver wis_saa7115_driver = {
        .id_table       = wis_saa7115_id,
 };
 
-static int __init wis_saa7115_init(void)
-{
-       return i2c_add_driver(&wis_saa7115_driver);
-}
-
-static void __exit wis_saa7115_cleanup(void)
-{
-       i2c_del_driver(&wis_saa7115_driver);
-}
-
-module_init(wis_saa7115_init);
-module_exit(wis_saa7115_cleanup);
+module_i2c_driver(wis_saa7115_driver);
 
 MODULE_LICENSE("GPL v2");
index 8f1b7d4f6a2e976504a849c262d462b0916a2b49..1291ab79d2af1189f5e5f319fab87097de6ac96c 100644 (file)
@@ -704,17 +704,6 @@ static struct i2c_driver wis_sony_tuner_driver = {
        .id_table       = wis_sony_tuner_id,
 };
 
-static int __init wis_sony_tuner_init(void)
-{
-       return i2c_add_driver(&wis_sony_tuner_driver);
-}
-
-static void __exit wis_sony_tuner_cleanup(void)
-{
-       i2c_del_driver(&wis_sony_tuner_driver);
-}
-
-module_init(wis_sony_tuner_init);
-module_exit(wis_sony_tuner_cleanup);
+module_i2c_driver(wis_sony_tuner_driver);
 
 MODULE_LICENSE("GPL v2");
index 9134f03e3cf092aa36d4d918cc897f14a9d32172..d6410ee01be86fbaee8dbb9428d1313d9ed917b2 100644 (file)
@@ -341,17 +341,6 @@ static struct i2c_driver wis_tw2804_driver = {
        .id_table       = wis_tw2804_id,
 };
 
-static int __init wis_tw2804_init(void)
-{
-       return i2c_add_driver(&wis_tw2804_driver);
-}
-
-static void __exit wis_tw2804_cleanup(void)
-{
-       i2c_del_driver(&wis_tw2804_driver);
-}
-
-module_init(wis_tw2804_init);
-module_exit(wis_tw2804_cleanup);
+module_i2c_driver(wis_tw2804_driver);
 
 MODULE_LICENSE("GPL v2");
index 9230f4a8052926c13de75810aab6d40c00992814..94071def3bb47dd93bbeef5a0e8f8fe3e7a183df 100644 (file)
@@ -325,17 +325,6 @@ static struct i2c_driver wis_tw9903_driver = {
        .id_table       = wis_tw9903_id,
 };
 
-static int __init wis_tw9903_init(void)
-{
-       return i2c_add_driver(&wis_tw9903_driver);
-}
-
-static void __exit wis_tw9903_cleanup(void)
-{
-       i2c_del_driver(&wis_tw9903_driver);
-}
-
-module_init(wis_tw9903_init);
-module_exit(wis_tw9903_cleanup);
+module_i2c_driver(wis_tw9903_driver);
 
 MODULE_LICENSE("GPL v2");
index 0127be2f3be0b68135aaa1ceeb3e75cac5a98536..05ac798f35f7d3aca908bc8d8989c0bd0756a845 100644 (file)
@@ -98,17 +98,6 @@ static struct i2c_driver wis_uda1342_driver = {
        .id_table       = wis_uda1342_id,
 };
 
-static int __init wis_uda1342_init(void)
-{
-       return i2c_add_driver(&wis_uda1342_driver);
-}
-
-static void __exit wis_uda1342_cleanup(void)
-{
-       i2c_del_driver(&wis_uda1342_driver);
-}
-
-module_init(wis_uda1342_init);
-module_exit(wis_uda1342_cleanup);
+module_i2c_driver(wis_uda1342_driver);
 
 MODULE_LICENSE("GPL v2");