Skip to content

Commit

Permalink
V4L/DVB (7972): or51132.c: unaligned
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Al Viro authored and Mauro Carvalho Chehab committed Jun 5, 2008
1 parent 637007f commit 18dcd55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/dvb/frontends/or51132.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static int or51132_readreg(struct or51132_state *state, u8 reg)
reg, err);
return -EREMOTEIO;
}
return le16_to_cpup((u16*)buf);
return buf[0] | (buf[1] << 8);
}

static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware *fw)
Expand All @@ -140,9 +140,9 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware
dprintk("Firmware is %Zd bytes\n",fw->size);

/* Get size of firmware A and B */
firmwareAsize = le32_to_cpu(*((u32*)fw->data));
firmwareAsize = le32_to_cpu(*((__le32*)fw->data));
dprintk("FirmwareA is %i bytes\n",firmwareAsize);
firmwareBsize = le32_to_cpu(*((u32*)(fw->data+4)));
firmwareBsize = le32_to_cpu(*((__le32*)(fw->data+4)));
dprintk("FirmwareB is %i bytes\n",firmwareBsize);

/* Upload firmware */
Expand Down

0 comments on commit 18dcd55

Please sign in to comment.