diff options
author | David S. Miller <davem@davemloft.net> | 2011-12-06 21:10:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-06 21:10:05 -0500 |
commit | 959327c7842e8621e28b89acea7d57ff02b60972 (patch) | |
tree | b00de195fa401186228796abdcd16812862fbf4d /include/linux/sigma.h | |
parent | f84ea779c25dabc90956f1c329e5e5c501ea96cc (diff) | |
parent | b835c0f47f725d864bf2545f10c733b754bb6d51 (diff) | |
download | blackbird-op-linux-959327c7842e8621e28b89acea7d57ff02b60972.tar.gz blackbird-op-linux-959327c7842e8621e28b89acea7d57ff02b60972.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'include/linux/sigma.h')
-rw-r--r-- | include/linux/sigma.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/include/linux/sigma.h b/include/linux/sigma.h index e2accb3164d8..d0de882c0d96 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); |