[PATCH 4/8] firmware: Sigma: Mark firmware strutcs packed

From: Lars-Peter Clausen
Date: Thu Nov 24 2011 - 07:48:52 EST


Mark structs which are embedded into the firmware as packed to avoid alignment
issues.

Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
Cc: stable@xxxxxxxxxx
---
include/linux/sigma.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sigma.h b/include/linux/sigma.h
index d0de882..745f1bd 100644
--- a/include/linux/sigma.h
+++ b/include/linux/sigma.h
@@ -25,7 +25,7 @@ struct sigma_firmware_header {
unsigned char magic[7];
u8 version;
__le32 crc;
-};
+} __packed;

enum {
SIGMA_ACTION_WRITEXBYTES = 0,
@@ -43,7 +43,7 @@ struct sigma_action {
__le16 len;
__be16 addr;
unsigned char payload[];
-};
+} __packed;

static inline u32 sigma_action_len(struct sigma_action *sa)
{
--
1.7.7.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/