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

Lars-Peter Clausen lars at metafoo.de
Thu Nov 24 13:48:23 CET 2011


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

Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
Cc: stable at kernel.org
---
 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




More information about the Alsa-devel mailing list