summaryrefslogtreecommitdiffstats
path: root/include/linux/sigma.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-12-07 17:33:09 +0100
committerTakashi Iwai <tiwai@suse.de>2011-12-07 17:33:09 +0100
commitffe7e4063987678c00589717d7871f837c6e7300 (patch)
tree1aeee46780d9f7601909a4baa5f0c766c555e2e2 /include/linux/sigma.h
parent9eb6e9b16f86ef94f05427bd7fc84d521aa57169 (diff)
parent0a34b42b6245ccc710be6759cded5b7fe41ea1f9 (diff)
Merge branch 'fix/hda' into topic/hda
Conflicts: sound/pci/hda/patch_realtek.c
Diffstat (limited to 'include/linux/sigma.h')
-rw-r--r--include/linux/sigma.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/include/linux/sigma.h b/include/linux/sigma.h
index e2accb3164d..d0de882c0d9 100644
--- a/include/linux/sigma.h
+++ b/include/linux/sigma.h
@@ -24,7 +24,7 @@ struct sigma_firmware {
struct sigma_firmware_header {
unsigned char magic[7];
u8 version;
- u32 crc;
+ __le32 crc;
};
enum {
@@ -40,19 +40,14 @@ enum {
struct sigma_action {
u8 instr;
u8 len_hi;
- u16 len;
- u16 addr;
+ __le16 len;
+ __be16 addr;
unsigned char payload[];
};
static inline u32 sigma_action_len(struct sigma_action *sa)
{
- return (sa->len_hi << 16) | sa->len;
-}
-
-static inline size_t sigma_action_size(struct sigma_action *sa, u32 payload_len)
-{
- return sizeof(*sa) + payload_len + (payload_len % 2);
+ return (sa->len_hi << 16) | le16_to_cpu(sa->len);
}
extern int process_sigma_firmware(struct i2c_client *client, const char *name);