Skip to content
Commit 1b84f2a4 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Olof Johansson
Browse files

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: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Tested-by: default avatarGwendal Grignou <gwendal@chromium.org>
Reviewed-by: default avatarGwendal Grignou <gwendal@chromium.org>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent c517d838
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment