diff options
author | Bernie Thompson <bernie@plugable.com> | 2010-09-05 16:35:27 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-05 16:50:20 -0700 |
commit | 1572f91cffd7c0d64ab4e0cec71e1d2d1a3349e1 (patch) | |
tree | a8ec8b492a7bd2e1697cc18b1cbdcd0904145e1f /drivers | |
parent | 18dffdf8913ab9e4ac7403a624879a15afa5262e (diff) |
staging: udlfb: fix big endian rendering error
Fix big endian rendering bug (affects PowerPC)
Thanks to Christian Melki at Ericsson for finding and suggesting patch.
Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/udlfb/udlfb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 6977b71e8c3c..bcb4a1e9e713 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -414,15 +414,14 @@ static void dlfb_compress_hline( uint8_t *cmd_pixels_count_byte = 0; const uint16_t *raw_pixel_start = 0; const uint16_t *cmd_pixel_start, *cmd_pixel_end = 0; - const uint32_t be_dev_addr = cpu_to_be32(dev_addr); prefetchw((void *) cmd); /* pull in one cache line at least */ *cmd++ = 0xAF; *cmd++ = 0x6B; - *cmd++ = (uint8_t) ((be_dev_addr >> 8) & 0xFF); - *cmd++ = (uint8_t) ((be_dev_addr >> 16) & 0xFF); - *cmd++ = (uint8_t) ((be_dev_addr >> 24) & 0xFF); + *cmd++ = (uint8_t) ((dev_addr >> 16) & 0xFF); + *cmd++ = (uint8_t) ((dev_addr >> 8) & 0xFF); + *cmd++ = (uint8_t) ((dev_addr) & 0xFF); cmd_pixels_count_byte = cmd++; /* we'll know this later */ cmd_pixel_start = pixel; |