summaryrefslogtreecommitdiff
path: root/chip/stm32
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@google.com>2017-08-02 16:30:30 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-08-02 08:16:00 -0700
commitd633871ef6b95078da5a735c81f8d34f90d647a0 (patch)
tree66ece06a5c6a86bb8d79b016000685ff287e23df /chip/stm32
parent577880a1b752924278b44dedff0d7649921b9d49 (diff)
downloadchrome-ec-d633871ef6b95078da5a735c81f8d34f90d647a0.tar.gz
usb_hid_*: Fix __packed struct coding style
EC code style should use __packed at the end of the structure, rather than __attribute__((__packed__)). BRANCH=none BUG=none TEST=Flash hammer Change-Id: Ib5dc71a8439038d46b9bc331bdabff7c57c7300a Signed-off-by: Nicolas Boichat <drinkcat@google.com> Reviewed-on: https://chromium-review.googlesource.com/597037 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'chip/stm32')
-rw-r--r--chip/stm32/usb_hid_keyboard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/stm32/usb_hid_keyboard.c b/chip/stm32/usb_hid_keyboard.c
index 3b1204e47b..48cf0c470b 100644
--- a/chip/stm32/usb_hid_keyboard.c
+++ b/chip/stm32/usb_hid_keyboard.c
@@ -42,7 +42,7 @@ static enum hid_protocol protocol = HID_REPORT_PROTOCOL;
* If this needs to be extended, we need to use this report in boot protocol
* mode, and an alternate one in report protocol mode.
*/
-struct __attribute__((__packed__)) usb_hid_keyboard_report {
+struct usb_hid_keyboard_report {
uint8_t modifiers; /* bitmap of modifiers 224-231 */
uint8_t reserved; /* 0x0 */
uint8_t keys[6];
@@ -50,7 +50,7 @@ struct __attribute__((__packed__)) usb_hid_keyboard_report {
uint8_t new_key:1;
uint8_t reserved2:7;
#endif
-};
+} __packed;
#define HID_KEYBOARD_REPORT_SIZE sizeof(struct usb_hid_keyboard_report)