summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-08-01 21:14:26 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2006-08-01 21:14:26 +0200
commitffd30a0b7eb2f6d72bf2eda5f47a0efa07a8ba12 (patch)
treebcc0a4510da7444f039d4dbe4c0c2f3c7fda64f2
parentabaa970749baa324bff6aafcd123302f1cdc96aa (diff)
downloadmediapointer-dvb-s2-ffd30a0b7eb2f6d72bf2eda5f47a0efa07a8ba12.tar.gz
mediapointer-dvb-s2-ffd30a0b7eb2f6d72bf2eda5f47a0efa07a8ba12.tar.bz2
cx25840_read4 has wrong endianness.
From: Hans Verkuil <hverkuil@xs4all.nl> cx25840_read4 assembled the bytes in the wrong order. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c
index 6558e317a..bd6a3d8fb 100644
--- a/linux/drivers/media/video/cx25840/cx25840-core.c
+++ b/linux/drivers/media/video/cx25840/cx25840-core.c
@@ -115,8 +115,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,