summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-29 12:00:17 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-29 12:00:17 +0000
commit1db7c89c62b3c0a0ebf8c07975ae907fa404116a (patch)
tree578e8aa4069367f70897c41f6e56b5b9912bdfac /include
parent7b282cbbf3c7bbad20505761a9eadd6d9a7280c7 (diff)
parentbda63586bc5929e97288cdb371bb6456504867ed (diff)
Merge branch 'for-3.2' into for-3.3
Diffstat (limited to 'include')
-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 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);