Commit d828fc9e authored by Grant Likely's avatar Grant Likely Committed by Greg Kroah-Hartman

V4L: Fix quickcam communicator driver for big endian architectures

Host endianess does not affect the order that pixel rgb data comes
in from the quickcam (the values are bytes, not words or longs).  The
driver is erroniously swapping the order of rgb values for big endian
machines.  This patch is needed get the Quickcam communicator working
on big endian machines (tested on powerpc)

(cherry picked from commit c6d704c8)
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7be1d0e5
......@@ -35,27 +35,13 @@ struct rgb {
};
struct bayL0 {
#ifdef __BIG_ENDIAN
u8 r;
u8 g;
#elif __LITTLE_ENDIAN
u8 g;
u8 r;
#else
#error not byte order defined
#endif
};
struct bayL1 {
#ifdef __BIG_ENDIAN
u8 g;
u8 b;
#elif __LITTLE_ENDIAN
u8 b;
u8 g;
#else
#error not byte order defined
#endif
};
struct cam_size {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment