diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-12-02 05:03:45 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:03:17 -0500 |
commit | 4a56eb3f535f92b0585aa01dba05b3f17a547df0 (patch) | |
tree | 796ae3ce9bf9b210342222098c7e78cc1738de74 /drivers/media/video/cx25840/cx25840-core.c | |
parent | 6b1e56763b50f169d8446c43df6adb70f69552db (diff) |
V4L/DVB (6743): cx25840: fix endianness inconsistency
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-core.c')
-rw-r--r-- | drivers/media/video/cx25840/cx25840-core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 6d2ca822a63..0d3d24aff50 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -73,10 +73,10 @@ int cx25840_write4(struct i2c_client *client, u16 addr, u32 value) | |||
73 | u8 buffer[6]; | 73 | u8 buffer[6]; |
74 | buffer[0] = addr >> 8; | 74 | buffer[0] = addr >> 8; |
75 | buffer[1] = addr & 0xff; | 75 | buffer[1] = addr & 0xff; |
76 | buffer[2] = value >> 24; | 76 | buffer[2] = value & 0xff; |
77 | buffer[3] = (value >> 16) & 0xff; | 77 | buffer[3] = (value >> 8) & 0xff; |
78 | buffer[4] = (value >> 8) & 0xff; | 78 | buffer[4] = (value >> 16) & 0xff; |
79 | buffer[5] = value & 0xff; | 79 | buffer[5] = value >> 24; |
80 | return i2c_master_send(client, buffer, 6); | 80 | return i2c_master_send(client, buffer, 6); |
81 | } | 81 | } |
82 | 82 | ||