Commit 17531c168c7b8138b5379a85de788798fc6696e1

Authored by Hans Verkuil
Committed by Mauro Carvalho Chehab
1 parent b02dc51591

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

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>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/media/video/cx25840/cx25840-core.c
... ... @@ -104,8 +104,8 @@
104 104 if (i2c_master_recv(client, buffer, 4) < 4)
105 105 return 0;
106 106  
107   - return (buffer[0] << 24) | (buffer[1] << 16) |
108   - (buffer[2] << 8) | buffer[3];
  107 + return (buffer[3] << 24) | (buffer[2] << 16) |
  108 + (buffer[1] << 8) | buffer[0];
109 109 }
110 110  
111 111 int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask,