Commit 18dcd55a authored by Al Viro's avatar Al Viro Committed by Mauro Carvalho Chehab

V4L/DVB (7972): or51132.c: unaligned

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 637007fe
...@@ -126,7 +126,7 @@ static int or51132_readreg(struct or51132_state *state, u8 reg) ...@@ -126,7 +126,7 @@ static int or51132_readreg(struct or51132_state *state, u8 reg)
reg, err); reg, err);
return -EREMOTEIO; 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) static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware *fw)
...@@ -140,9 +140,9 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware ...@@ -140,9 +140,9 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware
dprintk("Firmware is %Zd bytes\n",fw->size); dprintk("Firmware is %Zd bytes\n",fw->size);
/* Get size of firmware A and B */ /* 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); 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); dprintk("FirmwareB is %i bytes\n",firmwareBsize);
/* Upload firmware */ /* Upload firmware */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment