Skip to content
Commit 67bc8097 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jens Wiklander
Browse files

optee: simplify i2c access



Storing a bogus i2c_client structure on the stack adds overhead and
causes a compile-time warning:

drivers/tee/optee/rpc.c:493:6: error: stack frame size of 1056 bytes in function 'optee_handle_rpc' [-Werror,-Wframe-larger-than=]
void optee_handle_rpc(struct tee_context *ctx, struct optee_rpc_param *param,

Change the implementation of handle_rpc_func_cmd_i2c_transfer() to
open-code the i2c_transfer() call, which makes it easier to read
and avoids the warning.

Fixes: c05210ab ("drivers: optee: allow op-tee to access devices on the i2c bus")
Tested-by: default avatarJorge Ramirez-Ortiz <jorge@foundries.io>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
parent e71ba945
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment