summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-13 11:51:03 -0700
committerGerrit <chrome-bot@google.com>2012-07-13 17:28:22 -0700
commite95813c34f59b3a1da89217f340969a4e5913389 (patch)
treeda0c2cb73d6f545f826576f69991a2aab35972ca /include/ec_commands.h
parent114b7010b610e518072dd1e2d8563a08a026f192 (diff)
downloadchrome-ec-e95813c34f59b3a1da89217f340969a4e5913389.tar.gz
Define __packed inside ec_commands.h
Kernel and U-boot define it elsewhere, but coreboot doesn't. So put it here for greatest compatibility. BUG=none TEST=if it builds it works Change-Id: I595910e9198e37bc97d23cd4c249454e1ed64cd8 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/27375
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index b85c07d2d7..44f625fda9 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -128,6 +128,14 @@
*/
#ifndef __ACPI__
+/*
+ * Define __packed if someone hasn't beat us to it. Linux kernel style
+ * checking prefers __packed over __attribute__((packed)).
+ */
+#ifndef __packed
+#define __packed __attribute__((packed))
+#endif
+
/* LPC command status byte masks */
/* EC has written a byte in the data register and host hasn't read it yet */
#define EC_LPC_STATUS_TO_HOST 0x01