media: staging: atomisp: Use module_i2c_driver() macro
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 27 Sep 2017 18:24:58 +0000 (14:24 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Oct 2017 10:18:33 +0000 (06:18 -0400)
commit2cb63c4cf56fbe1a6dcc52595885eb2692a7df01
tree3231ed2dfa2b4fbb75167bd689b908e6adfb6ac7
parentd4870725b99a622e6d05ef62b6a648a3e28adfc3
media: staging: atomisp: Use module_i2c_driver() macro

This is done using coccinelle semantic patch:

//<smpl>
@a@
identifier f, x;
@@
-static f(...) { return i2c_add_driver(&x); }

@b depends on a@
identifier e, a.x;
@@
-static e(...) { i2c_del_driver(&x); }

@c depends on a && b@
identifier a.f;
declarer name module_init;
@@
-module_init(f);

@d depends on a && b && c@
identifier b.e, a.x;
declarer name module_exit;
declarer name module_i2c_driver;
@@
-module_exit(e);
+module_i2c_driver(x);
//</smpl>

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c
drivers/staging/media/atomisp/i2c/ov8858.c