drivers: optee: fix i2c build issue
authorJorge Ramirez-Ortiz <jorge@foundries.io>
Mon, 31 Aug 2020 16:11:02 +0000 (18:11 +0200)
committerJens Wiklander <jens.wiklander@linaro.org>
Tue, 1 Sep 2020 10:03:16 +0000 (12:03 +0200)
commit539f8fc253ece5501fdea1a6aa227d0618374111
tree21b0f582054c14fbadd139abcf6220660b90a1a0
parentc05210ab975771e161427eb47696b869d820bdaf
drivers: optee: fix i2c build issue

When the optee driver is compiled into the kernel while the i2c core
is configured as a module, the i2c symbols are not available.

This commit addresses the situation by disabling the i2c support for
this use case while allowing it in all other scenarios:

 i2c=y, optee=y
 i2c=m, optee=m
 i2c=y, optee=m
 i2c=m, optee=y (not supported)

Fixes: c05210ab9757 ("drivers: optee: allow op-tee to access devices on the i2c bus")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/optee/rpc.c