Skip to content

Commit

Permalink
V4L/DVB (4416): Cx25840_read4 has wrong endianness.
Browse files Browse the repository at this point in the history
cx25840_read4 assembled the bytes in the wrong order.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Aug 8, 2006
1 parent b02dc51 commit 17531c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/cx25840/cx25840-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ u32 cx25840_read4(struct i2c_client * client, u16 addr)
if (i2c_master_recv(client, buffer, 4) < 4)
return 0;

return (buffer[0] << 24) | (buffer[1] << 16) |
(buffer[2] << 8) | buffer[3];
return (buffer[3] << 24) | (buffer[2] << 16) |
(buffer[1] << 8) | buffer[0];
}

int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask,
Expand Down

0 comments on commit 17531c1

Please sign in to comment.