Commit 17531c16 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (4416): Cx25840_read4 has wrong endianness.

cx25840_read4 assembled the bytes in the wrong order.
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent b02dc515
...@@ -104,8 +104,8 @@ u32 cx25840_read4(struct i2c_client * client, u16 addr) ...@@ -104,8 +104,8 @@ u32 cx25840_read4(struct i2c_client * client, u16 addr)
if (i2c_master_recv(client, buffer, 4) < 4) if (i2c_master_recv(client, buffer, 4) < 4)
return 0; return 0;
return (buffer[0] << 24) | (buffer[1] << 16) | return (buffer[3] << 24) | (buffer[2] << 16) |
(buffer[2] << 8) | buffer[3]; (buffer[1] << 8) | buffer[0];
} }
int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask, int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask,
......
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