summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx25840/cx25840-core.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-12-02 11:03:45 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2007-12-02 11:03:45 +0100
commitea7f3e04e73a899fbd3ffb74418fbee30b9abc6c (patch)
treed43154680b2abf51c2128c0ad343a5f6b21072f6 /linux/drivers/media/video/cx25840/cx25840-core.c
parent61be9f9e8eabf527529e593eb9062c767a55940e (diff)
downloadmediapointer-dvb-s2-ea7f3e04e73a899fbd3ffb74418fbee30b9abc6c.tar.gz
mediapointer-dvb-s2-ea7f3e04e73a899fbd3ffb74418fbee30b9abc6c.tar.bz2
cx25840: fix endianness inconsistency
From: Hans Verkuil <hverkuil@xs4all.nl> cx25840_read4 reads a little-endian 32-bit value whereas cx25840_write4 writes the 32-bit value as big-endian. Convert write4 to use little-endian as well (that's the correct endianness). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/cx25840/cx25840-core.c')
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c
index 3f249b025..9f9bcc539 100644
--- a/linux/drivers/media/video/cx25840/cx25840-core.c
+++ b/linux/drivers/media/video/cx25840/cx25840-core.c
@@ -84,10 +84,10 @@ int cx25840_write4(struct i2c_client *client, u16 addr, u32 value)
u8 buffer[6];
buffer[0] = addr >> 8;
buffer[1] = addr & 0xff;
- buffer[2] = value >> 24;
- buffer[3] = (value >> 16) & 0xff;
- buffer[4] = (value >> 8) & 0xff;
- buffer[5] = value & 0xff;
+ buffer[2] = value & 0xff;
+ buffer[3] = (value >> 8) & 0xff;
+ buffer[4] = (value >> 16) & 0xff;
+ buffer[5] = value >> 24;
return i2c_master_send(client, buffer, 6);
}