aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Ripard <[email protected]>2013-01-11 14:31:43 -0800
committerLinus Torvalds <[email protected]>2013-01-11 14:54:54 -0800
commit552f0cc72aadfc8657876ce310e7a8dc37529536 (patch)
tree0d7138471797e8b7b08f02621fac2b02790f6726
parent04fa5d6a6547fbfcf613efd00637666fe19b24ab (diff)
drivers/video/ssd1307fb.c: fix bit order bug in the byte translation function
This was leading to a strange behaviour when using the fbcon driver on top of this one: the letters were in the right order, but each letter had a vertical symmetry. This was because the addressing was right for the byte, but the addressing of each individual bit was inverted. Signed-off-by: Maxime Ripard <[email protected]> Cc: Brian Lilly <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Florian Tobias Schandinat <[email protected]> Cc: Thomas Petazzoni <[email protected]> Cc: Tomi Valkeinen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--drivers/video/ssd1307fb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c
index 4d99dd7a6831..395cb6a8d8f3 100644
--- a/drivers/video/ssd1307fb.c
+++ b/drivers/video/ssd1307fb.c
@@ -145,8 +145,8 @@ static void ssd1307fb_update_display(struct ssd1307fb_par *par)
u32 page_length = SSD1307FB_WIDTH * i;
u32 index = page_length + (SSD1307FB_WIDTH * k + j) / 8;
u8 byte = *(vmem + index);
- u8 bit = byte & (1 << (7 - (j % 8)));
- bit = bit >> (7 - (j % 8));
+ u8 bit = byte & (1 << (j % 8));
+ bit = bit >> (j % 8);
buf |= bit << k;
}
ssd1307fb_write_data(par->client, buf);