media: staging: atomisp: imx: remove dead code
authorArnd Bergmann <arnd@arndb.de>
Mon, 7 Aug 2017 10:51:47 +0000 (06:51 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 27 Aug 2017 00:32:19 +0000 (20:32 -0400)
commit4a3039e26eba2f25cf66cb0f4b30e17a6ab13511
treef49c0cecc156fa0b2543255a61a19cf0c1b37e84
parentd726a0dcdfd8d65560f74b1d930f0d4793145afc
media: staging: atomisp: imx: remove dead code

Making some functions 'static' has uncovered a few functions that
have no caller, through the gcc warnings:

atomisp/i2c/imx/imx.c:1111:12: error: 'imx_t_focus_vcm' defined but not used [-Werror=unused-function]
atomisp/i2c/imx/imx.c:1103:12: error: 'imx_vcm_init' defined but not used [-Werror=unused-function]
atomisp/i2c/imx/imx.c:1095:12: error: 'imx_vcm_power_down' defined but not used [-Werror=unused-function]
atomisp/i2c/imx/imx.c:1087:12: error: 'imx_vcm_power_up' defined but not used [-Werror=unused-function]

All four of these can be removed. Since they call indirect functions,
I also looked at how those are used in turn:

- The power_up/power_down callbacks are called from other functions
  and are still needed.

- The t_focus_vcm callbacks pointers are completely unused and can
  be removed in both imx and ov8858. Some of the handlers are called
  directly and can now be marked static, the others are dummy
  implemntations that we can remove.

- vcm_init is unused in imx, but dw9718_vcm_init is used in ov8858,
  but is not used in imx, so that one needs to stay around. The callback
  pointers in imx can be removed.

Fixes: 9a5a6911aa3f ("staging: imx: fix non-static declarations")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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/imx/ad5816g.c
drivers/staging/media/atomisp/i2c/imx/drv201.c
drivers/staging/media/atomisp/i2c/imx/dw9714.c
drivers/staging/media/atomisp/i2c/imx/dw9718.c
drivers/staging/media/atomisp/i2c/imx/dw9719.c
drivers/staging/media/atomisp/i2c/imx/imx.c
drivers/staging/media/atomisp/i2c/imx/imx.h
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c
drivers/staging/media/atomisp/i2c/ov8858.h
drivers/staging/media/atomisp/i2c/ov8858_btns.h