ec_commands: Move #ifdef to encompass more code

To generate kernel ec_commands.h as lean as possible, include comments
within #ifdef.

BUG=chromium:945948
BRANCH=none
TEST=compile

Change-Id: I23e48aa68c456ac09e8418f80993e952043111f6
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1559379
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Gwendal Grignou 2019-04-08 11:49:52 -07:00 committed by chrome-bot
parent bae6aee1c6
commit d3ce30103e
1 changed files with 3 additions and 1 deletions

View File

@ -16,12 +16,12 @@
extern "C"{
#endif
#ifdef CHROMIUM_EC
/*
* Include common.h for CONFIG_HOSTCMD_ALIGNED, if it's defined. This
* generates more efficient code for accessing request/response structures on
* ARM Cortex-M if the structures are guaranteed 32-bit aligned.
*/
#ifdef CHROMIUM_EC
#include "common.h"
#endif
@ -401,6 +401,7 @@ extern "C"{
*/
#ifndef __ACPI__
#ifndef __KERNEL__
/*
* Define __packed if someone hasn't beat us to it. Linux kernel style
* checking prefers __packed over __attribute__((packed)).
@ -412,6 +413,7 @@ extern "C"{
#ifndef __aligned
#define __aligned(x) __attribute__((aligned(x)))
#endif
#endif /* __KERNEL__ */
/*
* Attributes for EC request and response packets. Just defining __packed