]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/chrome: lightbar: Fix lightbar_program_ex alignment
authorGwendal Grignou <gwendal@chromium.org>
Mon, 2 Feb 2026 10:06:21 +0000 (02:06 -0800)
committerTzung-Bi Shih <tzungbi@kernel.org>
Tue, 3 Feb 2026 02:22:38 +0000 (02:22 +0000)
Make sure sub-command of lightbar command starts with a 8bit
parameter to ensure alignment.

Fixes: 9600b8bdbfe4 ("platform/chrome: lightbar: Add support for large sequence")
Signed-off-by: Gwendal Grignou <gwendal@google.com>
Link: https://lore.kernel.org/r/20260202100621.3608437-1-gwendal@google.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
include/linux/platform_data/cros_ec_commands.h

index 14424314303424fd1ec736c841bf2f8046981e58..bddc7568158e9f9609d69e0fe466e655c6145a38 100644 (file)
@@ -2026,10 +2026,10 @@ struct lightbar_program {
  * EC RAM.
  */
 struct lightbar_program_ex {
-       uint16_t offset;
        uint8_t size;
+       uint16_t offset;
        uint8_t data[0];
-} __ec_todo_unpacked;
+} __ec_todo_packed;
 
 struct ec_params_lightbar {
        uint8_t cmd;                  /* Command (see enum lightbar_command) */