Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276290
b: refs/heads/master
c: bda6358
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Nov 29, 2011
1 parent 3d41fbd commit 8e83e9a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c56935bdc0a8edf50237d3b0205133a5b0adc604
refs/heads/master: bda63586bc5929e97288cdb371bb6456504867ed
2 changes: 1 addition & 1 deletion trunk/drivers/firmware/sigma.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ int process_sigma_firmware(struct i2c_client *client, const char *name)
crc = crc32(0, fw->data + sizeof(*ssfw_head),
fw->size - sizeof(*ssfw_head));
pr_debug("%s: crc=%x\n", __func__, crc);
if (crc != ssfw_head->crc)
if (crc != le32_to_cpu(ssfw_head->crc))
goto done;

ssfw.pos = sizeof(*ssfw_head);
Expand Down
8 changes: 4 additions & 4 deletions trunk/include/linux/sigma.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct sigma_firmware {
struct sigma_firmware_header {
unsigned char magic[7];
u8 version;
u32 crc;
__le32 crc;
};

enum {
Expand All @@ -40,14 +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;
return (sa->len_hi << 16) | le16_to_cpu(sa->len);
}

extern int process_sigma_firmware(struct i2c_client *client, const char *name);
Expand Down

0 comments on commit 8e83e9a

Please sign in to comment.