-
- Downloads
mfd: cros_ec: Use fixed size arrays to transfer data with the EC
The struct cros_ec_command will be used as an ioctl() argument for the API to control the ChromeOS EC from user-space. So the data structure has to be 64-bit safe to make it compatible between 32 and 64 avoiding the need for a compat ioctl interface. Since pointers are self-aligned to different byte boundaries, use fixed size arrays instead of pointers for transferring ingoing and outgoing data with the Embedded Controller. Also, re-arrange struct members by decreasing alignment requirements to reduce the needing padding size. Signed-off-by:Javier Martinez Canillas <javier.martinez@collabora.co.uk> Acked-by:
Lee Jones <lee.jones@linaro.org> Tested-by:
Gwendal Grignou <gwendal@chromium.org> Reviewed-by:
Gwendal Grignou <gwendal@chromium.org> Signed-off-by:
Olof Johansson <olof@lixom.net>
Showing
- drivers/i2c/busses/i2c-cros-ec-tunnel.c 10 additions, 41 deletionsdrivers/i2c/busses/i2c-cros-ec-tunnel.c
- drivers/input/keyboard/cros_ec_keyb.c 8 additions, 5 deletionsdrivers/input/keyboard/cros_ec_keyb.c
- drivers/mfd/cros_ec.c 7 additions, 8 deletionsdrivers/mfd/cros_ec.c
- include/linux/mfd/cros_ec.h 4 additions, 4 deletionsinclude/linux/mfd/cros_ec.h
Please register or sign in to comment